mirror of
https://github.com/ItsDrike/nixdots
synced 2024-12-27 22:34:35 +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...";
|
|
};
|
|
};
|
|
}
|