diff --git a/modules/applications/firefox.nix b/modules/applications/firefox.nix index 1d92f6c..279e519 100644 --- a/modules/applications/firefox.nix +++ b/modules/applications/firefox.nix @@ -15,11 +15,9 @@ in with lib; { config = mkIf cfg.enable { environment.sessionVariables = { MOZ_USE_XINPUT2 = "1"; - } // (if graphical.protocol == "Wayland" then { + } // optionals (graphical.protocol == "Wayland") { MOZ_ENABLE_WAYLAND = "1"; - } else - { }) - // (if sway_cfg.enable then { XDG_CURRENT_DESKTOP = "sway"; } else { }); + } // optionals (sway_cfg.enable) { XDG_CURRENT_DESKTOP = "sway"; }; home-manager.users.james = { programs.firefox = { diff --git a/modules/applications/gnome-common.nix b/modules/applications/gnome-common.nix index dc37b69..b954445 100644 --- a/modules/applications/gnome-common.nix +++ b/modules/applications/gnome-common.nix @@ -1,34 +1,36 @@ { config, lib, pkgs, ... }: -let graphical = config.this.graphical; +let + graphical = config.this.graphical; + power = config.this.system.power; in with lib; { config = mkIf graphical.enable { home-manager.users.james = { - home.packages = with pkgs.gnome; [ - #gnome-common - cheese - file-roller - gnome-bluetooth - gnome-books - gnome-boxes - gnome-calendar - gnome-characters - gnome-color-manager - gnome-contacts - gnome-control-center - gnome-dictionary - #gnome-documents - gnome-font-viewer - gnome-keyring - gnome-maps - gnome-music - gnome-power-manager # conditioanl if upower is used - iagno - libgnome-keyring - nautilus - pomodoro - seahorse - sushi - ]; + home.packages = with pkgs.gnome; + [ + #gnome-common + cheese + file-roller + gnome-bluetooth + gnome-books + gnome-boxes + gnome-calendar + gnome-characters + gnome-color-manager + gnome-contacts + gnome-control-center + gnome-dictionary + #gnome-documents + gnome-font-viewer + gnome-keyring + gnome-maps + gnome-music + iagno + libgnome-keyring + nautilus + pomodoro + seahorse + sushi + ] ++ optionals (power.enable) [ gnome-power-manager ]; }; }; } diff --git a/modules/profiles/graphical.nix b/modules/profiles/graphical.nix index cccf6ab..b3b6097 100644 --- a/modules/profiles/graphical.nix +++ b/modules/profiles/graphical.nix @@ -6,7 +6,10 @@ ./minimal.nix ]; - this.graphical.enable = true; + this = { + graphical.enable = true; + system.power.enable = true; + }; # Enable sound. sound.enable = true; diff --git a/modules/system/default.nix b/modules/system/default.nix index fb97bd2..b6a2b9e 100644 --- a/modules/system/default.nix +++ b/modules/system/default.nix @@ -6,6 +6,7 @@ ./flatpak.nix ./fonts.nix ./gtk.nix + ./power.nix ./xdg.nix ./zfs.nix ];