nixos/selfoss: set Type=oneshot for selfoss-update.service

This ensures that `systemctl start` will block until the update is
finished, as is common for a lot of script-like units around nixpkgs.
In this case, it was particularly useful for the NixOS test in the
subsequent commit.
This commit is contained in:
h7x4
2026-09-03 12:50:20 +09:00
parent 06a65c4607
commit 70d5d0006d

View File

@@ -236,6 +236,7 @@ in
systemd.services.selfoss-update = {
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.php83}/bin/php ${dataDir}/cliupdate.php";
StateDirectory = [ (baseNameOf dataDir) ];
User = "${cfg.user}";
@@ -243,7 +244,6 @@ in
startAt = "hourly";
after = [ "selfoss-config.service" ];
wantedBy = [ "multi-user.target" ];
};
services.nginx = mkIf cfg.nginx.enable {