diff --git a/home/options.nix b/home/options.nix index 17c61df..24b09cc 100644 --- a/home/options.nix +++ b/home/options.nix @@ -78,13 +78,23 @@ let example = "/sys/class/hwmon/hwmon2/temp1_input"; }; - sway.options = { - enable = lib.mkEnableOption "sway" // { + windowManager.options = { + enable = lib.mkEnableOption "window manager" // { default = fromConfig [ "gui" - "sway" + "windowManager" + "enable" ] 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; @@ -114,26 +124,6 @@ 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 = @@ -152,10 +142,10 @@ let default = null; type = types.nullOr (types.submodule tempInfo); }; - sway = lib.mkOption { - description = "Sway window manager configuration."; + windowManager = lib.mkOption { + description = "Window manager configuration."; default = { }; - type = types.submodule sway; + type = types.submodule windowManager; }; terminal = lib.mkOption { description = "The terminal emulator to use."; diff --git a/system/options.nix b/system/options.nix index 01903f4..51ac162 100644 --- a/system/options.nix +++ b/system/options.nix @@ -37,7 +37,20 @@ let options.autoStart = mkDisableOption "autostarting ydotool at login"; }; }; - windowManager = mkDisableOption "window manager"; + 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"; + }; + }; + }; + }; }; styling.options = {