diff --git a/home/roles/desktop/default.nix b/home/roles/desktop/default.nix index cee93b1..0de7491 100644 --- a/home/roles/desktop/default.nix +++ b/home/roles/desktop/default.nix @@ -90,7 +90,11 @@ in Service = { Type = "oneshot"; ExecStart = "${pkgs.rbw}/bin/rbw unlock"; - Environment = "PATH=${pkgs.rbw}/bin:/run/current-system/sw/bin"; + Environment = "RBW_AGENT=${pkgs.rbw}/bin/rbw-agent"; + # KillMode = "process" prevents systemd from killing the rbw-agent daemon + # when this oneshot service completes. The agent is spawned by rbw unlock + # and needs to persist after the service exits. + KillMode = "process"; }; Install = { WantedBy = [ "graphical-session.target" ]; @@ -105,7 +109,11 @@ in Service = { Type = "oneshot"; ExecStart = "${pkgs.rbw}/bin/rbw unlock"; - Environment = "PATH=${pkgs.rbw}/bin:/run/current-system/sw/bin"; + Environment = "RBW_AGENT=${pkgs.rbw}/bin/rbw-agent"; + # KillMode = "process" prevents systemd from killing the rbw-agent daemon + # when this oneshot service completes. The agent is spawned by rbw unlock + # and needs to persist after the service exits. + KillMode = "process"; }; Install = { WantedBy = [ "suspend.target" ];