about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2016-05-14 04:55:27 +0300
committerNikolay Amiantov <ab@fmap.me>2016-05-14 04:55:27 +0300
commit5c39f28a9f393b419569ca9cd405f4f86570a4b9 (patch)
treeb13257c7155243ced6e8ce37bac3fe0508d04e9f
parentac8cd3e9a60ca88a060ea02fe740059d91bd480e (diff)
parent21f984f59029a3c68d4a70d1c52173a29c6a2daf (diff)
downloadnixlib-5c39f28a9f393b419569ca9cd405f4f86570a4b9.tar
nixlib-5c39f28a9f393b419569ca9cd405f4f86570a4b9.tar.gz
nixlib-5c39f28a9f393b419569ca9cd405f4f86570a4b9.tar.bz2
nixlib-5c39f28a9f393b419569ca9cd405f4f86570a4b9.tar.lz
nixlib-5c39f28a9f393b419569ca9cd405f4f86570a4b9.tar.xz
nixlib-5c39f28a9f393b419569ca9cd405f4f86570a4b9.tar.zst
nixlib-5c39f28a9f393b419569ca9cd405f4f86570a4b9.zip
Merge pull request #15024 from abbradar/xfce-no-desktop
xfce service: add noDesktop option
-rw-r--r--nixos/modules/services/x11/desktop-managers/xfce.nix43
1 files changed, 27 insertions, 16 deletions
diff --git a/nixos/modules/services/x11/desktop-managers/xfce.nix b/nixos/modules/services/x11/desktop-managers/xfce.nix
index 60934ed5f190..9500988f2be3 100644
--- a/nixos/modules/services/x11/desktop-managers/xfce.nix
+++ b/nixos/modules/services/x11/desktop-managers/xfce.nix
@@ -12,20 +12,29 @@ in
 {
   options = {
 
-    services.xserver.desktopManager.xfce.enable = mkOption {
-      type = types.bool;
-      default = false;
-      description = "Enable the Xfce desktop environment.";
-    };
+    services.xserver.desktopManager.xfce = {
+      enable = mkOption {
+        type = types.bool;
+        default = false;
+        description = "Enable the Xfce desktop environment.";
+      };
+
+      thunarPlugins = mkOption {
+        default = [];
+        type = types.listOf types.package;
+        example = literalExample "[ pkgs.xfce.thunar-archive-plugin ]";
+        description = ''
+          A list of plugin that should be installed with Thunar.
+        '';
+      };
 
-    services.xserver.desktopManager.xfce.thunarPlugins = mkOption {
-      default = [];
-      type = types.listOf types.package;
-      example = literalExample "[ pkgs.xfce.thunar-archive-plugin ]";
-      description = ''
-        A list of plugin that should be installed with Thunar.
-      '';
+      noDesktop = mkOption {
+        type = types.bool;
+        default = false;
+        description = "Don't install XFCE desktop components (xfdesktop, panel and notification daemon).";
+      };
     };
+
   };
 
 
@@ -62,14 +71,12 @@ in
         pkgs.xfce.terminal
        (pkgs.xfce.thunar.override { thunarPlugins = cfg.thunarPlugins; })
         pkgs.xfce.xfce4icontheme
-        pkgs.xfce.xfce4panel
         pkgs.xfce.xfce4session
         pkgs.xfce.xfce4settings
         pkgs.xfce.xfce4mixer
         pkgs.xfce.xfce4volumed
         pkgs.xfce.xfce4screenshooter
         pkgs.xfce.xfconf
-        pkgs.xfce.xfdesktop
         pkgs.xfce.xfwm4
         # This supplies some "abstract" icons such as
         # "utilities-terminal" and "accessories-text-editor".
@@ -81,9 +88,13 @@ in
         pkgs.xfce.gvfs
         pkgs.xfce.xfce4_appfinder
         pkgs.xfce.tumbler       # found via dbus
-        pkgs.xfce.xfce4notifyd  # found via dbus
       ]
-      ++ optional config.powerManagement.enable pkgs.xfce.xfce4_power_manager;
+      ++ optional config.powerManagement.enable pkgs.xfce.xfce4_power_manager
+      ++ optionals (!cfg.noDesktop)
+         [ pkgs.xfce.xfce4panel
+           pkgs.xfce.xfdesktop
+	   pkgs.xfce.xfce4notifyd  # found via dbus
+         ];
 
     environment.pathsToLink =
       [ "/share/xfce4" "/share/themes" "/share/mime" "/share/desktop-directories" "/share/gtksourceview-2.0" ];