about summary refs log tree commit diff
path: root/nixos/modules/services/x11/xserver.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-12-17 11:49:54 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-12-17 11:49:54 +0100
commitb475afcf6018f8f7404664012eddcbb25e055f0f (patch)
treeaa82661e9983fd0e65a95c0a5908161974336d22 /nixos/modules/services/x11/xserver.nix
parente51fa468b36fdafec9ca05321ecf413ba864ffbc (diff)
parent52f872ec27fa9bcbcc33f7d97ac4416386316f8f (diff)
downloadnixlib-b475afcf6018f8f7404664012eddcbb25e055f0f.tar
nixlib-b475afcf6018f8f7404664012eddcbb25e055f0f.tar.gz
nixlib-b475afcf6018f8f7404664012eddcbb25e055f0f.tar.bz2
nixlib-b475afcf6018f8f7404664012eddcbb25e055f0f.tar.lz
nixlib-b475afcf6018f8f7404664012eddcbb25e055f0f.tar.xz
nixlib-b475afcf6018f8f7404664012eddcbb25e055f0f.tar.zst
nixlib-b475afcf6018f8f7404664012eddcbb25e055f0f.zip
Merge pull request #11228 from ocharles/x-ctrl-alt-backspace
services.xserver: Disable Ctrl+Alt+Backspace by default
Diffstat (limited to 'nixos/modules/services/x11/xserver.nix')
-rw-r--r--nixos/modules/services/x11/xserver.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix
index 799a7329813c..d637a753bb29 100644
--- a/nixos/modules/services/x11/xserver.nix
+++ b/nixos/modules/services/x11/xserver.nix
@@ -409,6 +409,16 @@ in
           if possible.
         '';
       };
+
+      enableCtrlAltBackspace = mkOption {
+        type = types.bool;
+        default = false;
+        description = ''
+          Whether to enable the DontZap option, which binds Ctrl+Alt+Backspace
+          to forcefully kill X. This can lead to data loss and is disabled
+          by default.
+        '';
+      };
     };
 
   };
@@ -534,6 +544,7 @@ in
       ''
         Section "ServerFlags"
           Option "AllowMouseOpenFail" "on"
+          Option "DontZap" "${if cfg.enableCtrlAltBackspace then "off" else "on"}"
           ${cfg.serverFlagsSection}
         EndSection