diff --git a/hosts/petalburg/default.nix b/hosts/petalburg/default.nix index be29c5f4..d0c3aef9 100644 --- a/hosts/petalburg/default.nix +++ b/hosts/petalburg/default.nix @@ -78,7 +78,7 @@ in { desktopConfig = { enable = true; windowManagers.hyprland.enable = false; - gnome.enable = true; + desktopEnvironments.gnome.enable = true; }; apps = { diff --git a/nixosModules/desktopConfig/default.nix b/nixosModules/desktopConfig/default.nix index a6b0d906..5e6a80ae 100644 --- a/nixosModules/desktopConfig/default.nix +++ b/nixosModules/desktopConfig/default.nix @@ -1,7 +1,7 @@ { pkgs, lib, config, ... }: { imports = - [ ./displayManagers/lightdm ./gnome ./plasma ./windowManagers/hyprland ]; + [ ./displayManagers/lightdm ./desktopEnvironments ./windowManagers ]; options = { desktopConfig.enable = diff --git a/nixosModules/desktopConfig/desktopEnvironments/default.nix b/nixosModules/desktopConfig/desktopEnvironments/default.nix new file mode 100644 index 00000000..bc727611 --- /dev/null +++ b/nixosModules/desktopConfig/desktopEnvironments/default.nix @@ -0,0 +1,4 @@ +{ pkgs, lib, config, ... }: { + + imports = [ ./gnome ./plasma ]; +} diff --git a/nixosModules/desktopConfig/gnome/default.nix b/nixosModules/desktopConfig/desktopEnvironments/gnome/default.nix similarity index 87% rename from nixosModules/desktopConfig/gnome/default.nix rename to nixosModules/desktopConfig/desktopEnvironments/gnome/default.nix index 4a1fab50..d9f6eb39 100644 --- a/nixosModules/desktopConfig/gnome/default.nix +++ b/nixosModules/desktopConfig/desktopEnvironments/gnome/default.nix @@ -6,11 +6,12 @@ ]; options = { - desktopConfig.gnome.enable = + desktopConfig.desktopEnvironments.gnome.enable = lib.mkEnableOption "Enables GNOME desktop session."; }; - config = lib.mkIf config.desktopConfig.gnome.enable { + config = lib.mkIf config.desktopConfig.desktopEnvironments.gnome.enable { + environment.systemPackages = with pkgs; [ gnomeExtensions.appindicator gnomeExtensions.blur-my-shell diff --git a/nixosModules/desktopConfig/gnome/fprintdFix.nix b/nixosModules/desktopConfig/desktopEnvironments/gnome/fprintdFix.nix similarity index 88% rename from nixosModules/desktopConfig/gnome/fprintdFix.nix rename to nixosModules/desktopConfig/desktopEnvironments/gnome/fprintdFix.nix index cb4ebd1a..c16de051 100644 --- a/nixosModules/desktopConfig/gnome/fprintdFix.nix +++ b/nixosModules/desktopConfig/desktopEnvironments/gnome/fprintdFix.nix @@ -1,11 +1,11 @@ { pkgs, lib, config, ... }: { options = { - desktopConfig.gnome.fprintdFix.enable = lib.mkEnableOption + desktopConfig.desktopEnvironments.gnome.fprintdFix.enable = lib.mkEnableOption "Fixes fprintd and pam issues with GNOME Display Manager."; }; - config = lib.mkIf config.desktopConfig.gnome.fprintdFix.enable { + config = lib.mkIf config.desktopConfig.desktopEnvironments.gnome.fprintdFix.enable { # Need to change the order pam loads its modules # to get proper fingerprint behavior on GDM and the lockscreen. security.pam.services.login.fprintAuth = false; diff --git a/nixosModules/desktopConfig/gnome/tripleBuffering.nix b/nixosModules/desktopConfig/desktopEnvironments/gnome/tripleBuffering.nix similarity index 80% rename from nixosModules/desktopConfig/gnome/tripleBuffering.nix rename to nixosModules/desktopConfig/desktopEnvironments/gnome/tripleBuffering.nix index 505e6883..d09c9d0a 100644 --- a/nixosModules/desktopConfig/gnome/tripleBuffering.nix +++ b/nixosModules/desktopConfig/desktopEnvironments/gnome/tripleBuffering.nix @@ -1,11 +1,11 @@ { pkgs, lib, config, ... }: { options = { - desktopConfig.gnome.tripleBuffering.enable = + desktopConfig.desktopEnvironments.gnome.tripleBuffering.enable = lib.mkEnableOption "Enables dynamic triple buffering for GNOME."; }; - config = lib.mkIf config.desktopConfig.gnome.tripleBuffering.enable { + config = lib.mkIf config.desktopConfig.desktopEnvironments.gnome.tripleBuffering.enable { nixpkgs.overlays = [ (final: prev: { gnome = prev.gnome.overrideScope (gnomeFinal: gnomePrev: { diff --git a/nixosModules/desktopConfig/plasma/default.nix b/nixosModules/desktopConfig/desktopEnvironments/plasma/default.nix similarity index 99% rename from nixosModules/desktopConfig/plasma/default.nix rename to nixosModules/desktopConfig/desktopEnvironments/plasma/default.nix index 271cc8f5..015469cc 100644 --- a/nixosModules/desktopConfig/plasma/default.nix +++ b/nixosModules/desktopConfig/desktopEnvironments/plasma/default.nix @@ -6,6 +6,7 @@ }; config = lib.mkIf config.desktopConfig.plasma.enable { + # Enable SDDM + Plasma Desktop. services = { desktopManager.plasma6.enable = true; diff --git a/nixosModules/desktopConfig/windowManagers/default.nix b/nixosModules/desktopConfig/windowManagers/default.nix new file mode 100644 index 00000000..f16f9236 --- /dev/null +++ b/nixosModules/desktopConfig/windowManagers/default.nix @@ -0,0 +1,4 @@ +{ pkgs, lib, config, ... }: { + + imports = [ ./hyprland ]; +} diff --git a/nixosModules/desktopConfig/windowManagers/hyprland/default.nix b/nixosModules/desktopConfig/windowManagers/hyprland/default.nix index 88cab812..4e5a399b 100644 --- a/nixosModules/desktopConfig/windowManagers/hyprland/default.nix +++ b/nixosModules/desktopConfig/windowManagers/hyprland/default.nix @@ -1,14 +1,14 @@ { pkgs, lib, config, ... }: { options = { - desktopConfig.windowManagers.hyprland.enable = lib.mkEnableOption - "Enables hyprland window manager session."; + desktopConfig.windowManagers.hyprland.enable = + lib.mkEnableOption "Enables hyprland window manager session."; }; config = lib.mkIf config.desktopConfig.windowManagers.hyprland.enable { desktopConfig.displayManagers.lightdm.enable = lib.mkDefault true; - + programs.hyprland.enable = true; services.power-profiles-daemon.enable = true; services.upower.enable = true; @@ -22,6 +22,8 @@ services.gvfs.enable = true; # Mount, trash, and other functionalities services.tumbler.enable = true; # Thumbnail support for images + xdg.portal.extraPortals = with pkgs; [ xdg-desktop-portal-hyprland ]; + environment.sessionVariables.NIXOS_OZONE_WL = "1"; }; }