nixdots/system/roles/workstation/programs/physlock.nix

15 lines
432 B
Nix
Raw Normal View History

{ lib, config, ...}: let
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-04-15 21:22:23 +00:00
};
}