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