Commit 6478f80b authored by Marie Ramlow's avatar Marie Ramlow
Browse files

nixos/rosenpass: move preStart into script to workaround systemd bug

Because of a systemd bug, using both ExecStartPre and ExecStart will fill up the systemd credentials directory,
which leads to rosenpass failing to start.
This will be fixed in systemd v256, see https://github.com/systemd/systemd/pull/31202

Related issue: https://github.com/NixOS/nixpkgs/issues/258371
parent ec2f5e1c
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -225,8 +225,10 @@ in
        # See <https://www.freedesktop.org/software/systemd/man/systemd.unit.html#Specifiers>
        environment.CONFIG = "%t/${serviceConfig.RuntimeDirectory}/config.toml";

        preStart = "${getExe pkgs.envsubst} -i ${config} -o \"$CONFIG\"";
        script = "rosenpass exchange-config \"$CONFIG\"";
        script = ''
          ${getExe pkgs.envsubst} -i ${config} -o "$CONFIG"
          rosenpass exchange-config "$CONFIG"
        '';
      };
  };
}