mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 05:43:50 +03:00
services.xserver: Disable Ctrl+Alt+Backspace by default
Ctrl+Alt+Backspace is usually enabled by default under X, and is a keyboard shortcut that forcefully kills the current X server. This can lead to data loss by users if accidentally pressed. This commit introduces a new option, services.xserver.enableCtrlAltBackspace, that is *disabled* by default. If set to true, the previous behavior can be restored. A similar decision was made by the Ubuntu team, and is documented here: https://wiki.ubuntu.com/XorgCtrlAltBackspace
This commit is contained in:
parent
d0589b0c54
commit
52f872ec27
@ -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.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
@ -533,6 +543,7 @@ in
|
||||
''
|
||||
Section "ServerFlags"
|
||||
Option "AllowMouseOpenFail" "on"
|
||||
Option "DontZap" "${if cfg.enableCtrlAltBackspace then "off" else "on"}"
|
||||
${cfg.serverFlagsSection}
|
||||
EndSection
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user