summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2023-08-18 06:07:57 +0200
committerAlan Pearce2023-08-18 06:07:57 +0200
commitc8afd4a3e99642bf618ee7d9d9d556617dc20ecc (patch)
tree0304735eb8b34d52ce43ce5dbed16ba8c6bf2b2f
parenta83d0bfc90bfdc58f8b570fa810e3aff3f2af26b (diff)
downloadnixfiles-c8afd4a3e99642bf618ee7d9d9d556617dc20ecc.tar.lz
nixfiles-c8afd4a3e99642bf618ee7d9d9d556617dc20ecc.tar.zst
nixfiles-c8afd4a3e99642bf618ee7d9d9d556617dc20ecc.zip
window-manager: only run nm-applet if network-manager is in use
-rw-r--r--system/settings/programs/window-manager.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/system/settings/programs/window-manager.nix b/system/settings/programs/window-manager.nix
index e22609fe..bbe4c638 100644
--- a/system/settings/programs/window-manager.nix
+++ b/system/settings/programs/window-manager.nix
@@ -1,5 +1,6 @@
 { config
 , pkgs
+, lib
 , ...
 }: {
   services.xserver = {
@@ -21,8 +22,9 @@
       sessionCommands = ''
         ${pkgs.xorg.xrdb}/bin/xrdb -merge $HOME/.xresources/main
         ${pkgs.xorg.xsetroot}/bin/xsetroot -cursor_name left_ptr -solid '#4d4d4c'
+      '' ++ (lib.optionalString config.networking.networkmanager.enable ''
         ${pkgs.networkmanagerapplet}/bin/nm-applet &
-      '';
+      '');
     };
     xautolock = {
       enable = true;