diff --git a/modules/services/x11/window-managers/i3.nix b/modules/services/x11/window-managers/i3.nix index d688c064c5ac..6777a95ddc8c 100644 --- a/modules/services/x11/window-managers/i3.nix +++ b/modules/services/x11/window-managers/i3.nix @@ -1,7 +1,8 @@ -{pkgs, config, ...}: +{ pkgs, config, ... }: + +with pkgs.lib; let - inherit (pkgs.lib) mkOption mkIf; cfg = config.services.xserver.windowManager.i3; in @@ -13,6 +14,15 @@ in example = true; description = "Enable the i3 tiling window manager."; }; + + configFile = mkOption { + default = null; + type = types.nullOr types.path; + description = '' + Path to the i3 configuration file. + If left at the default value, $HOME/.i3/config will be used. + ''; + }; }; }; @@ -21,7 +31,9 @@ in session = [{ name = "i3"; start = " - ${pkgs.i3}/bin/i3 & + ${pkgs.i3}/bin/i3 ${optionalString (cfg.configFile != null) + "-c \"${cfg.configFile}\"" + } & waitPID=$! "; }];