2024-07-26 23:07:07 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: let
|
2024-06-10 16:52:38 +00:00
|
|
|
inherit (lib) mkIf;
|
|
|
|
deviceType = config.myOptions.device.roles.type;
|
|
|
|
acceptedTypes = ["laptop" "desktop"];
|
|
|
|
in {
|
|
|
|
config = mkIf (builtins.elem deviceType acceptedTypes) {
|
|
|
|
# Screen locker which works across all virtual terminals
|
|
|
|
# Use `systemctl start physlock` to securely lock the screen
|
|
|
|
services.physlock = {
|
|
|
|
enable = true;
|
|
|
|
lockMessage = "System is locked...";
|
2024-06-27 14:05:31 +00:00
|
|
|
|
|
|
|
# Don't auto-lock the system with physlock, I prefer other (gui) lockers
|
|
|
|
# I only use physlock manually in some circumstances
|
|
|
|
lockOn = {
|
|
|
|
suspend = false;
|
|
|
|
hibernate = false;
|
|
|
|
};
|
2024-06-10 16:52:38 +00:00
|
|
|
};
|
2024-04-15 21:22:23 +00:00
|
|
|
};
|
|
|
|
}
|