@@ -16,6 +16,7 @@ let
1616 cfg.extraPackages cfg.haskellPackages ++
1717 optionals cfg.enableContribAndExtras
1818 (with cfg.haskellPackages; [ xmonad-contrib xmonad-extras ]);
19+ inherit (cfg) ghcArgs;
1920 } cfg.config;
2021
2122in
@@ -76,6 +77,24 @@ in
7677 }
7778 '';
7879 };
80+
81+ xmonadCliArgs = mkOption {
82+ default = [];
83+ type = with lib.types; listOf str;
84+ description = ''
85+ Command line arguments passed to the xmonad binary.
86+ '';
87+ };
88+
89+ ghcArgs = mkOption {
90+ default = [];
91+ type = with lib.types; listOf str;
92+ description = ''
93+ Command line arguments passed to the compiler (ghc)
94+ invocation when xmonad.config is set.
95+ '';
96+ };
97+
7998 };
8099 };
81100 config = mkIf cfg.enable {
@@ -85,7 +104,7 @@ in
85104 start = let
86105 xmonadCommand = if (cfg.config != null) then xmonadBin else "${xmonad}/bin/xmonad";
87106 in ''
88− systemd-cat -t xmonad ${xmonadCommand} &
107+ systemd-cat -t xmonad -- ${xmonadCommand} ${lib.escapeShellArgs cfg.xmonadCliArgs} &
89108 waitPID=$!
90109 '';
91110 }];