From 70d5d0006dbb6ec151e45f8a3604d76d1c822997 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Thu, 3 Sep 2026 12:50:20 +0900 Subject: [PATCH] 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. --- nixos/modules/services/web-apps/selfoss.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/web-apps/selfoss.nix b/nixos/modules/services/web-apps/selfoss.nix index 30b40e4e21a3..2b8ab4663b84 100644 --- a/nixos/modules/services/web-apps/selfoss.nix +++ b/nixos/modules/services/web-apps/selfoss.nix @@ -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 {