Add missing device role check for physlock

This commit is contained in:
ItsDrike 2024-06-10 18:52:38 +02:00
parent 002e288d48
commit 4c775478bc
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0

View file

@ -1,8 +1,14 @@
{ { lib, config, ...}: let
# Screen locker which works across all virtual terminals inherit (lib) mkIf;
# Use `systemctl start physlock` to securely lock the screen deviceType = config.myOptions.device.roles.type;
services.physlock = { acceptedTypes = ["laptop" "desktop"];
enable = true; in {
lockMessage = "System is locked..."; 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...";
};
}; };
} }