diff --git a/home/options.nix b/home/options.nix index 24b09cc..17c61df 100644 --- a/home/options.nix +++ b/home/options.nix @@ -78,23 +78,13 @@ let example = "/sys/class/hwmon/hwmon2/temp1_input"; }; - windowManager.options = { - enable = lib.mkEnableOption "window manager" // { + sway.options = { + enable = lib.mkEnableOption "sway" // { default = fromConfig [ "gui" - "windowManager" - "enable" + "sway" ] true; }; - windowManager = lib.mkOption { - description = "Which window manager to enable"; - type = types.enum [ "niri" ]; - default = fromConfig [ - "gui" - "windowManager" - "windowManager" - ] "niri"; - }; background = lib.mkOption { description = "The wallpaper to use."; type = types.path; @@ -124,6 +114,26 @@ let default = true; example = false; }; + exec = lib.mkOption { + description = "Run commands when starting sway."; + default = { }; + type = types.submodule { + options = { + once = lib.mkOption { + description = "Programs to start only once (`exec`)."; + type = types.listOf types.str; + default = [ ]; + example = [ "signal-desktop --start-in-tray" ]; + }; + always = lib.mkOption { + description = "Programs to start whenever the config is sourced (`exec_always`)."; + type = types.listOf types.str; + default = [ ]; + example = [ "signal-desktop --start-in-tray" ]; + }; + }; + }; + }; }; gui.options = @@ -142,10 +152,10 @@ let default = null; type = types.nullOr (types.submodule tempInfo); }; - windowManager = lib.mkOption { - description = "Window manager configuration."; + sway = lib.mkOption { + description = "Sway window manager configuration."; default = { }; - type = types.submodule windowManager; + type = types.submodule sway; }; terminal = lib.mkOption { description = "The terminal emulator to use."; diff --git a/system/options.nix b/system/options.nix index 51ac162..01903f4 100644 --- a/system/options.nix +++ b/system/options.nix @@ -37,20 +37,7 @@ let options.autoStart = mkDisableOption "autostarting ydotool at login"; }; }; - windowManager = lib.mkOption { - description = "Window manager configuration"; - default = { }; - type = types.submodule { - options = { - enable = mkDisableOption "window manager"; - windowManager = lib.mkOption { - description = "Which window manager to enable"; - type = types.enum [ "niri" ]; - default = "niri"; - }; - }; - }; - }; + windowManager = mkDisableOption "window manager"; }; styling.options = {