summary refs log tree commit diff
path: root/nixos/modules/services/x11/window-managers/i3.nix
diff options
context:
space:
mode:
authorGuillaume Maudoux <layus.on@gmail.com>2015-10-26 22:30:59 +0100
committerGuillaume Maudoux <layus.on@gmail.com>2015-10-26 22:33:11 +0100
commiteb46e0fc7249e304dd6d4b3bdec2d7a07c7a9b84 (patch)
treea5763ea471b02dbcc01ee910e8d16a5457cc2355 /nixos/modules/services/x11/window-managers/i3.nix
parent82d88b5bcb68d7c039aa689210512cf08aedb22c (diff)
downloadnixpkgs-eb46e0fc7249e304dd6d4b3bdec2d7a07c7a9b84.tar
nixpkgs-eb46e0fc7249e304dd6d4b3bdec2d7a07c7a9b84.tar.gz
nixpkgs-eb46e0fc7249e304dd6d4b3bdec2d7a07c7a9b84.tar.bz2
nixpkgs-eb46e0fc7249e304dd6d4b3bdec2d7a07c7a9b84.tar.lz
nixpkgs-eb46e0fc7249e304dd6d4b3bdec2d7a07c7a9b84.tar.xz
nixpkgs-eb46e0fc7249e304dd6d4b3bdec2d7a07c7a9b84.tar.zst
nixpkgs-eb46e0fc7249e304dd6d4b3bdec2d7a07c7a9b84.zip
i3wm: Add debug & logging options
Diffstat (limited to 'nixos/modules/services/x11/window-managers/i3.nix')
-rw-r--r--nixos/modules/services/x11/window-managers/i3.nix23
1 files changed, 22 insertions, 1 deletions
diff --git a/nixos/modules/services/x11/window-managers/i3.nix b/nixos/modules/services/x11/window-managers/i3.nix
index e85c3bce591..510997e76af 100644
--- a/nixos/modules/services/x11/window-managers/i3.nix
+++ b/nixos/modules/services/x11/window-managers/i3.nix
@@ -23,6 +23,23 @@ in
           If left at the default value, $HOME/.i3/config will be used.
         '';
       };
+
+      debug = mkOption {
+        default = false;
+        example = true;
+        type = types.bool;
+        description = "Enable debug/verbose logging (see -V option)";
+      };
+
+      logFile = mkOption {
+        default = null;
+        example = "$HOME/.i3/i3log";
+        type = types.string;
+        description = ''
+          Path to a logfile for i3.
+          If left at the default value, logs will appear in display-manager.service's logs.
+        '';
+      };
     };
   };
 
@@ -32,7 +49,11 @@ in
         name = "i3";
         start = ''
           ${pkgs.i3}/bin/i3 ${optionalString (cfg.configFile != null)
-            "-c \"${cfg.configFile}\""
+            ''-c "${cfg.configFile}"''
+          } ${optionalString cfg.debug
+            ''-V''
+          } ${optionalString (cfg.logFile != null)
+            ''>> "${cfg.logFile}"''
           } &
           waitPID=$!
         '';