From 995ca87bce2507c81b5d518ea49c6a31e398f9ae Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Sun, 1 Mar 2020 23:56:51 +0300 Subject: [PATCH] Update modules/users.nix --- modules/users.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/users.nix b/modules/users.nix index 9503a53..5fe75ea 100644 --- a/modules/users.nix +++ b/modules/users.nix @@ -37,13 +37,14 @@ "/run/user/1000"; 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 = { 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}"; };