diff --git a/hosts/cadmium/configuration.nix b/hosts/cadmium/configuration.nix index 1bb11aa..620fd71 100644 --- a/hosts/cadmium/configuration.nix +++ b/hosts/cadmium/configuration.nix @@ -47,7 +47,10 @@ bootloader = "systemd-boot"; bluetooth.enable = true; uefi.enable = true; - gui.enable = true; + gui = { + enable = true; + sway.enable = true; + }; workstation.enable = true; sdr.enable = true; libvirt.enable = true; diff --git a/hosts/copper/configuration.nix b/hosts/copper/configuration.nix index d6b5718..bcca713 100644 --- a/hosts/copper/configuration.nix +++ b/hosts/copper/configuration.nix @@ -59,7 +59,10 @@ bootloader = "lanzaboote"; bluetooth.enable = true; uefi.enable = true; - gui.enable = true; + gui = { + enable = true; + sway.enable = true; + }; workstation.enable = true; sdr.enable = true; libvirt.enable = true; diff --git a/modules/default.nix b/modules/default.nix index ce090f5..7e5f2aa 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -4,11 +4,8 @@ options.jalr = { gui = { enable = lib.mkEnableOption "GUI"; - desktop = lib.mkOption { - type = lib.types.nullOr (lib.types.enum [ "sway" "gnome" ]); - default = "sway"; - description = "Desktop environment to install"; - }; + sway.enable = lib.mkEnableOption "sway"; + gnome.enable = lib.mkEnableOption "gnome"; }; workstation.enable = lib.mkEnableOption "Workstation"; }; diff --git a/modules/gnome.nix b/modules/gnome.nix index 528934b..1ad2995 100644 --- a/modules/gnome.nix +++ b/modules/gnome.nix @@ -1,6 +1,6 @@ { config, lib, ... }: -lib.mkIf (config.jalr.gui.enable && config.jalr.gui.desktop == "gnome") { +lib.mkIf (config.jalr.gui.enable && config.jalr.gui.gnome.enable) { services.xserver = { enable = true; desktopManager.gnome.enable = true; diff --git a/modules/sway.nix b/modules/sway.nix index 286fa6e..0d12723 100644 --- a/modules/sway.nix +++ b/modules/sway.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: -lib.mkIf (config.jalr.gui.enable && config.jalr.gui.desktop == "sway") { +lib.mkIf (config.jalr.gui.enable && config.jalr.gui.sway.enable) { programs = { wshowkeys.enable = true; dconf.enable = true; @@ -17,7 +17,7 @@ lib.mkIf (config.jalr.gui.enable && config.jalr.gui.desktop == "sway") { let command = pkgs.writeShellScript "sway-init" '' systemctl --user import-environment PATH - systemctl --user restart xdg-desktop-portal.service + #systemctl --user restart xdg-desktop-portal.service exec ${pkgs.sway}/bin/sway ''; user = "jalr";