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
|
@ -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…
Reference in a new issue