summary refs log tree commit diff
path: root/nixos/modules/services/x11/window-managers/i3.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/services/x11/window-managers/i3.nix')
-rw-r--r--nixos/modules/services/x11/window-managers/i3.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/nixos/modules/services/x11/window-managers/i3.nix b/nixos/modules/services/x11/window-managers/i3.nix
index aea0a8986786..cfe9439b688c 100644
--- a/nixos/modules/services/x11/window-managers/i3.nix
+++ b/nixos/modules/services/x11/window-managers/i3.nix
@@ -15,12 +15,21 @@ let
         If left at the default value, $HOME/.i3/config will be used.
       '';
     };
+    extraSessionCommands = mkOption {
+      default = "";
+      type = types.lines;
+      description = ''
+        Shell commands executed just before i3 is started.
+      '';
+    };
   };
 
   i3config = name: pkg: cfg: {
     services.xserver.windowManager.session = [{
       inherit name;
       start = ''
+        ${cfg.extraSessionCommands}
+
         ${pkg}/bin/i3 ${optionalString (cfg.configFile != null)
           "-c \"${cfg.configFile}\""
         } &