Update modules/users.nix
This commit is contained in:
parent
468df0520e
commit
e10a2c61e8
@ -37,7 +37,16 @@
|
||||
"/run/user/1000";
|
||||
|
||||
services.udev.extraRules = ''
|
||||
ACTION=="remove", ATTRS{idVendor}=="1050", RUN+="${pkgs.systemd}/bin/systemctl suspend"'';
|
||||
ACTION=="remove", ATTRS{idVendor}=="1050", RUN+="${pkgs.systemd}/bin/systemctl start swaylock"'';
|
||||
|
||||
systemd.services.swaylock = {
|
||||
description = "Lock the screen";
|
||||
serviceConfig.User = "balsoft";
|
||||
environment.XDG_RUNTIME_DIR = "/run/user/1000";
|
||||
serviceConfig.Type = "oneshot";
|
||||
path = [pkgs.swaylock];
|
||||
script = "swaylock -c ${builtins.substring 1 7 config.themes.colors.bg}";
|
||||
};
|
||||
|
||||
security.pam.u2f = {
|
||||
control = "sufficient";
|
||||
|
Loading…
Reference in New Issue
Block a user