Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

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.

+9 -1
+9 -1
nixos/modules/services/security/physlock.nix
··· 57 ''; 58 }; 59 60 lockOn = { 61 62 suspend = mkOption { ··· 116 ++ cfg.lockOn.extraTargets; 117 serviceConfig = { 118 Type = "forking"; 119 - ExecStart = "${pkgs.physlock}/bin/physlock -d${optionalString cfg.disableSysRq "s"}${optionalString (cfg.lockMessage != "") " -p \"${cfg.lockMessage}\""}"; 120 }; 121 }; 122
··· 57 ''; 58 }; 59 60 + muteKernelMessages = mkOption { 61 + type = types.bool; 62 + default = false; 63 + description = lib.mdDoc '' 64 + Disable kernel messages on console while physlock is running. 65 + ''; 66 + }; 67 + 68 lockOn = { 69 70 suspend = mkOption { ··· 124 ++ cfg.lockOn.extraTargets; 125 serviceConfig = { 126 Type = "forking"; 127 + ExecStart = "${pkgs.physlock}/bin/physlock -d${optionalString cfg.muteKernelMessages "m"}${optionalString cfg.disableSysRq "s"}${optionalString (cfg.lockMessage != "") " -p \"${cfg.lockMessage}\""}"; 128 }; 129 }; 130