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
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...";
};
};
}