nixos/xmonad: allow passing command line arguments
commit15d87cb81c61d10a641449529ab94e1a2552492c
authorDominik Xaver Hörl <hoe.dom@gmx.de>
dateMon 7 Sep 2020, 19:25 (6 years ago)
parent6ee4ca6
nixos/modules/services/x11/window-managers/xmonad.nix+10−1
@@ -76,6 +76,15 @@ in
7676 }
7777 '';
7878 };
79+
80+ xmonadCliArgs = mkOption {
81+ default = [];
82+ type = with lib.types; listOf str;
83+ description = ''
84+ Command line arguments passed to the xmonad binary.
85+ '';
86+ };
87+
7988 };
8089 };
8190 config = mkIf cfg.enable {
@@ -85,7 +94,7 @@ in
8594 start = let
8695 xmonadCommand = if (cfg.config != null) then xmonadBin else "${xmonad}/bin/xmonad";
8796 in ''
88− systemd-cat -t xmonad ${xmonadCommand} &
97+ systemd-cat -t xmonad -- ${xmonadCommand} ${lib.escapeShellArgs cfg.xmonadCliArgs} &
8998 waitPID=$!
9099 '';
91100 }];