treewide: add missing systemd ordering directives

In particular, we were missing `sops-install-secrets.service` in a ton
of places, and `network-online.target` for some homebrewn services.

This has caused failure of some services on machine startup.
This commit is contained in:
h7x4
2026-07-22 17:56:06 +09:00
parent 9a837d210d
commit 384534bf86
27 changed files with 200 additions and 56 deletions
+11 -2
View File
@@ -154,8 +154,14 @@ in {
environment.systemPackages = [ cfg.package ];
systemd.services.gitea = lib.mkIf cfg.enable {
wants = [ "redis-gitea.service" ];
after = [ "redis-gitea.service" ];
after = [
"sops-install-secrets.service"
"redis-gitea.service"
];
requires = [
"sops-install-secrets.service"
"redis-gitea.service"
];
serviceConfig = {
CPUSchedulingPolicy = "batch";
@@ -216,6 +222,9 @@ in {
};
systemd.services.gitea-dump = {
after = [ "sops-install-secrets.service" ];
requires = [ "sops-install-secrets.service" ];
serviceConfig.ExecStart = let
args = lib.cli.toCommandLineShellGNU { } {
type = cfg.dump.type;