set credentials oneshots to stop after launch

This commit is contained in:
Noah Masur 2022-10-14 01:35:14 +00:00
parent c2d0037bab
commit a17a048d9d
2 changed files with 2 additions and 8 deletions

View File

@ -74,10 +74,7 @@ in {
systemd.services.transmission-creds = {
requiredBy = [ "transmission.service" ];
before = [ "transmission.service" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
};
serviceConfig = { Type = "oneshot"; };
script = ''
if [ ! -f "${credentialsFile}" ]; then
mkdir --parents ${builtins.dirOf credentialsFile}

View File

@ -46,10 +46,7 @@
wantedBy = [ "wireguard-wg0.service" ];
requiredBy = [ "wireguard-wg0.service" ];
before = [ "wireguard-wg0.service" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
};
serviceConfig = { Type = "oneshot"; };
script = let
encryptedPrivateKey = config.networking.wireguard.encryptedPrivateKey;
privateKeyFile =