diff --git a/hosts/bifrost/network/firewall.nix b/hosts/bifrost/network/firewall.nix index d5349af..8ecca5b 100644 --- a/hosts/bifrost/network/firewall.nix +++ b/hosts/bifrost/network/firewall.nix @@ -1,4 +1,5 @@ _: { + systemd.services.nftables.after = [ "wg-quick-Homelab.service" ]; networking = { nftables = { enable = true; diff --git a/hosts/shared/caddy.nix b/hosts/shared/caddy.nix index b332993..55971f0 100644 --- a/hosts/shared/caddy.nix +++ b/hosts/shared/caddy.nix @@ -20,7 +20,10 @@ } ''; }; - systemd.services.caddy.serviceConfig.EnvironmentFile = config.sops.secrets."caddy/env_file".path; + systemd.services.caddy = { + after = [ "wg-quick-Homelab.service" ]; + serviceConfig.EnvironmentFile = config.sops.secrets."caddy/env_file".path; + }; networking.firewall.allowedTCPPorts = [ 80 443 ]; networking.firewall.allowedUDPPorts = [ 80 443 ]; } diff --git a/hosts/wynne/services/apps/dendrite/default.nix b/hosts/wynne/services/apps/dendrite/default.nix index c279903..14e668c 100644 --- a/hosts/wynne/services/apps/dendrite/default.nix +++ b/hosts/wynne/services/apps/dendrite/default.nix @@ -6,7 +6,7 @@ in { description = "Dendrite Matrix homeserver"; - after = [ "network.target" ]; + after = [ "network.target" "wg-quick-Homelab.service" "postgresql.service" ]; wantedBy = [ "multi-user.target" ]; unitConfig.RequiresMountsFor = [ "/mnt/data" ]; serviceConfig = { diff --git a/hosts/wynne/services/apps/forgejo.nix b/hosts/wynne/services/apps/forgejo.nix index aff0129..ad96c69 100644 --- a/hosts/wynne/services/apps/forgejo.nix +++ b/hosts/wynne/services/apps/forgejo.nix @@ -74,4 +74,5 @@ in database.createDatabase = true; }; }; + systemd.services.forgejo.after = [ "wg-quick-Homelab.service" "postgresql.service" ]; } diff --git a/hosts/wynne/services/apps/ntfy.nix b/hosts/wynne/services/apps/ntfy.nix index f56bbd6..65393eb 100644 --- a/hosts/wynne/services/apps/ntfy.nix +++ b/hosts/wynne/services/apps/ntfy.nix @@ -16,11 +16,16 @@ let domainName = "ntfy.acomputer.lol"; in { }; }; }; - systemd.services.ntfy-sh.unitConfig.RequiresMountsFor = [ "/mnt/data" ]; - systemd.services.ntfy-sh.serviceConfig.WorkingDirectory = "/mnt/data/ntfy-sh"; - systemd.services.ntfy-sh.serviceConfig.User = "ntfy-sh"; - systemd.services.ntfy-sh.serviceConfig.Group = "ntfy-sh"; - systemd.services.ntfy-sh.serviceConfig.DynamicUser = lib.mkForce false; + systemd.services.ntfy-sh = { + after = [ "wg-quick-Homelab.service" ]; + unitConfig.RequiresMountsFor = [ "/mnt/data" ]; + serviceConfig = { + WorkingDirectory = "/mnt/data/ntfy-sh"; + User = "ntfy-sh"; + Group = "ntfy-sh"; + DynamicUser = lib.mkForce false; + }; + }; users.users.ntfy-sh.home = "/mnt/data/ntfy-sh"; users.users.ntfy-sh.createHome = true; diff --git a/hosts/wynne/services/apps/postgresql.nix b/hosts/wynne/services/apps/postgresql.nix index 01a4c08..ed9062d 100644 --- a/hosts/wynne/services/apps/postgresql.nix +++ b/hosts/wynne/services/apps/postgresql.nix @@ -14,7 +14,6 @@ host all all 127.0.0.1/8 trust host all all ::1/128 trust host all all 10.10.10.0/24 trust - host all all fd7c:585c:c4ae::0/64 trust ''; ensureDatabases = [ "dendrite" "forgejo" ]; ensureUsers = [