mirror of
https://github.com/ItsDrike/nixdots
synced 2024-11-10 14:57:17 +00:00
15 lines
432 B
Nix
15 lines
432 B
Nix
{ 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...";
|
|
};
|
|
};
|
|
}
|