diff --git a/nixos/modules/services/desktops/gnome3/at-spi2-core.nix b/nixos/modules/services/desktops/gnome3/at-spi2-core.nix index 22a54f511d1c..615f272e7b9a 100644 --- a/nixos/modules/services/desktops/gnome3/at-spi2-core.nix +++ b/nixos/modules/services/desktops/gnome3/at-spi2-core.nix @@ -4,6 +4,9 @@ with lib; +let + gnome3 = config.environment.gnome3.packageSet; +in { ###### interface @@ -30,9 +33,9 @@ with lib; config = mkIf config.services.gnome3.at-spi2-core.enable { - environment.systemPackages = [ pkgs.gnome3.at_spi2_core ]; + environment.systemPackages = [ gnome3.at_spi2_core ]; - services.dbus.packages = [ pkgs.gnome3.at_spi2_core ]; + services.dbus.packages = [ gnome3.at_spi2_core ]; }; diff --git a/nixos/modules/services/desktops/gnome3/gnome-documents.nix b/nixos/modules/services/desktops/gnome3/gnome-documents.nix index 1f7592c0b417..2279ef48fb9c 100644 --- a/nixos/modules/services/desktops/gnome3/gnome-documents.nix +++ b/nixos/modules/services/desktops/gnome3/gnome-documents.nix @@ -4,6 +4,9 @@ with pkgs.lib; +let + gnome3 = config.environment.gnome3.packageSet; +in { ###### interface @@ -30,9 +33,9 @@ with pkgs.lib; config = mkIf config.services.gnome3.gnome-documents.enable { - environment.systemPackages = [ pkgs.gnome3.gnome-documents ]; + environment.systemPackages = [ gnome3.gnome-documents ]; - services.dbus.packages = [ pkgs.gnome3.gnome-documents ]; + services.dbus.packages = [ gnome3.gnome-documents ]; services.gnome3.gnome-online-accounts.enable = true; diff --git a/nixos/modules/services/desktops/gnome3/gnome-keyring.nix b/nixos/modules/services/desktops/gnome3/gnome-keyring.nix index 447fd783f148..be14f1fcbc0c 100644 --- a/nixos/modules/services/desktops/gnome3/gnome-keyring.nix +++ b/nixos/modules/services/desktops/gnome3/gnome-keyring.nix @@ -4,6 +4,9 @@ with pkgs.lib; +let + gnome3 = config.environment.gnome3.packageSet; +in { ###### interface @@ -31,9 +34,9 @@ with pkgs.lib; config = mkIf config.services.gnome3.gnome-keyring.enable { - environment.systemPackages = [ pkgs.gnome3.gnome_keyring ]; + environment.systemPackages = [ gnome3.gnome_keyring ]; - services.dbus.packages = [ pkgs.gnome3.gnome_keyring ]; + services.dbus.packages = [ gnome3.gnome_keyring ]; }; diff --git a/nixos/modules/services/desktops/gnome3/gnome-online-accounts.nix b/nixos/modules/services/desktops/gnome3/gnome-online-accounts.nix index 365e19c15bb1..a41fb0101f0f 100644 --- a/nixos/modules/services/desktops/gnome3/gnome-online-accounts.nix +++ b/nixos/modules/services/desktops/gnome3/gnome-online-accounts.nix @@ -4,6 +4,9 @@ with pkgs.lib; +let + gnome3 = config.environment.gnome3.packageSet; +in { ###### interface @@ -30,9 +33,9 @@ with pkgs.lib; config = mkIf config.services.gnome3.gnome-online-accounts.enable { - environment.systemPackages = [ pkgs.gnome3.gnome_online_accounts ]; + environment.systemPackages = [ gnome3.gnome_online_accounts ]; - services.dbus.packages = [ pkgs.gnome3.gnome_online_accounts ]; + services.dbus.packages = [ gnome3.gnome_online_accounts ]; }; diff --git a/nixos/modules/services/desktops/gnome3/gnome-online-miners.nix b/nixos/modules/services/desktops/gnome3/gnome-online-miners.nix index c921327a74ce..030d4bac6a76 100644 --- a/nixos/modules/services/desktops/gnome3/gnome-online-miners.nix +++ b/nixos/modules/services/desktops/gnome3/gnome-online-miners.nix @@ -4,6 +4,9 @@ with pkgs.lib; +let + gnome3 = config.environment.gnome3.packageSet; +in { ###### interface @@ -30,9 +33,9 @@ with pkgs.lib; config = mkIf config.services.gnome3.gnome-online-miners.enable { - environment.systemPackages = [ pkgs.gnome3.gnome-online-miners ]; + environment.systemPackages = [ gnome3.gnome-online-miners ]; - services.dbus.packages = [ pkgs.gnome3.gnome-online-miners ]; + services.dbus.packages = [ gnome3.gnome-online-miners ]; }; diff --git a/nixos/modules/services/desktops/gnome3/gnome-user-share.nix b/nixos/modules/services/desktops/gnome3/gnome-user-share.nix index df796ed77ff4..3b6c713f7be3 100644 --- a/nixos/modules/services/desktops/gnome3/gnome-user-share.nix +++ b/nixos/modules/services/desktops/gnome3/gnome-user-share.nix @@ -4,6 +4,9 @@ with pkgs.lib; +let + gnome3 = config.environment.gnome3.packageSet; +in { ###### interface @@ -30,9 +33,9 @@ with pkgs.lib; config = mkIf config.services.gnome3.gnome-user-share.enable { - environment.systemPackages = [ pkgs.gnome3.gnome-user-share ]; + environment.systemPackages = [ gnome3.gnome-user-share ]; - services.xserver.displayManager.sessionCommands = with pkgs.gnome3; '' + services.xserver.displayManager.sessionCommands = with gnome3; '' # Don't let gnome-control-center depend upon gnome-user-share export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${gnome-user-share}/share/gsettings-schemas/${gnome-user-share.name} ''; diff --git a/nixos/modules/services/desktops/gnome3/seahorse.nix b/nixos/modules/services/desktops/gnome3/seahorse.nix index cad22a6a5983..01e4a24f2672 100644 --- a/nixos/modules/services/desktops/gnome3/seahorse.nix +++ b/nixos/modules/services/desktops/gnome3/seahorse.nix @@ -4,6 +4,9 @@ with pkgs.lib; +let + gnome3 = config.environment.gnome3.packageSet; +in { ###### interface @@ -29,9 +32,9 @@ with pkgs.lib; config = mkIf config.services.gnome3.seahorse.enable { - environment.systemPackages = [ pkgs.gnome3.seahorse ]; + environment.systemPackages = [ gnome3.seahorse ]; - services.dbus.packages = [ pkgs.gnome3.seahorse ]; + services.dbus.packages = [ gnome3.seahorse ]; }; diff --git a/nixos/modules/services/desktops/gnome3/sushi.nix b/nixos/modules/services/desktops/gnome3/sushi.nix index 7a4389038b22..ff7f484602c7 100644 --- a/nixos/modules/services/desktops/gnome3/sushi.nix +++ b/nixos/modules/services/desktops/gnome3/sushi.nix @@ -4,6 +4,9 @@ with lib; +let + gnome3 = config.environment.gnome3.packageSet; +in { ###### interface @@ -29,9 +32,9 @@ with lib; config = mkIf config.services.gnome3.sushi.enable { - environment.systemPackages = [ pkgs.gnome3.sushi ]; + environment.systemPackages = [ gnome3.sushi ]; - services.dbus.packages = [ pkgs.gnome3.sushi ]; + services.dbus.packages = [ gnome3.sushi ]; }; diff --git a/nixos/modules/services/desktops/gnome3/tracker.nix b/nixos/modules/services/desktops/gnome3/tracker.nix index 94a22d0c8819..670e585c6f55 100644 --- a/nixos/modules/services/desktops/gnome3/tracker.nix +++ b/nixos/modules/services/desktops/gnome3/tracker.nix @@ -4,6 +4,9 @@ with pkgs.lib; +let + gnome3 = config.environment.gnome3.packageSet; +in { ###### interface @@ -30,9 +33,9 @@ with pkgs.lib; config = mkIf config.services.gnome3.tracker.enable { - environment.systemPackages = [ pkgs.gnome3.tracker ]; + environment.systemPackages = [ gnome3.tracker ]; - services.dbus.packages = [ pkgs.gnome3.tracker ]; + services.dbus.packages = [ gnome3.tracker ]; }; diff --git a/nixos/modules/services/x11/desktop-managers/gnome3.nix b/nixos/modules/services/x11/desktop-managers/gnome3.nix index 3f48035f6bba..63f39ec0d3af 100644 --- a/nixos/modules/services/x11/desktop-managers/gnome3.nix +++ b/nixos/modules/services/x11/desktop-managers/gnome3.nix @@ -4,13 +4,13 @@ with lib; let cfg = config.services.xserver.desktopManager.gnome3; - gnome3 = pkgs.gnome3; + gnome3 = config.environment.gnome3.packageSet; # Remove packages of ys from xs, based on their names removePackagesByName = xs: ys: let pkgName = drv: (builtins.parseDrvName drv.name).name; - ysNames = map pkgName ys; + ysNames = map pkgName ys; res = (filter (x: !(builtins.elem (pkgName x) ysNames)) xs); in filter (x: !(builtins.elem (pkgName x) ysNames)) xs; @@ -35,6 +35,12 @@ in { description = "Enable Gnome 3 desktop manager."; }; + environment.gnome3.packageSet = mkOption { + default = pkgs.gnome3; + example = literalExample "pkgs.gnome3_12"; + description = "Which Gnome 3 package set to use."; + }; + environment.gnome3.excludePackages = mkOption { default = []; example = "[ pkgs.gnome3.totem ]"; @@ -80,7 +86,7 @@ in { # Don't let epiphany depend upon gnome-shell # Override default mimeapps - export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${pkgs.gnome3.gnome_shell}/share/gsettings-schemas/${pkgs.gnome3.gnome_shell.name}:${mimeAppsList}/share + export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${gnome3.gnome_shell}/share/gsettings-schemas/${gnome3.gnome_shell.name}:${mimeAppsList}/share # Let gnome-control-center find gnome-shell search providers export GNOME_SEARCH_PROVIDERS_DIR=${config.system.path}/share/gnome-shell/search-providers/