mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-23 17:56:53 +03:00
nixos/physlock: add muteKernelMessages options
Add an option for physlock's -m flag, which mutes kernel messages on the console. This ensures that the password prompt is the only thing on the screen and isn't lost in a flood of kernel messages.
This commit is contained in:
parent
ca258d7988
commit
ee090cd808
1 changed files with 9 additions and 1 deletions
|
@ -57,6 +57,14 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
muteKernelMessages = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
Disable kernel messages on console while physlock is running.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
lockOn = {
|
lockOn = {
|
||||||
|
|
||||||
suspend = mkOption {
|
suspend = mkOption {
|
||||||
|
@ -116,7 +124,7 @@ in
|
||||||
++ cfg.lockOn.extraTargets;
|
++ cfg.lockOn.extraTargets;
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "forking";
|
Type = "forking";
|
||||||
ExecStart = "${pkgs.physlock}/bin/physlock -d${optionalString cfg.disableSysRq "s"}${optionalString (cfg.lockMessage != "") " -p \"${cfg.lockMessage}\""}";
|
ExecStart = "${pkgs.physlock}/bin/physlock -d${optionalString cfg.muteKernelMessages "m"}${optionalString cfg.disableSysRq "s"}${optionalString (cfg.lockMessage != "") " -p \"${cfg.lockMessage}\""}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue