start caddy after garage

this should eliminate the problem of caddy being down after every update
This commit is contained in:
nora 2025-07-27 21:19:32 +02:00
parent 8a5b59965d
commit 2bd8830cd0
2 changed files with 3 additions and 1 deletions

View file

@ -2,7 +2,8 @@
meta = meta =
let let
my-projects-versions = builtins.fromJSON (builtins.readFile ./my-projects.json); my-projects-versions = builtins.fromJSON (builtins.readFile ./my-projects.json);
nixpkgs-path = (fetchTarball "https://github.com/NixOS/nixpkgs/archive/50ab793786d9de88ee30ec4e4c24fb4236fc2674.tar.gz"); # nixos-24.11 2025-07-27 nixpkgs-hash = "50ab793786d9de88ee30ec4e4c24fb4236fc2674"; # nixos-24.11 2025-07-27
nixpkgs-path = (fetchTarball "https://github.com/NixOS/nixpkgs/archive/${nixpkgs-hash}.tar.gz");
in in
{ {
# Override to pin the Nixpkgs version (recommended). This option # Override to pin the Nixpkgs version (recommended). This option

View file

@ -30,6 +30,7 @@ in
age.secrets.caddy_s3_key_secret.file = ../../secrets/caddy_s3_key_secret.age; age.secrets.caddy_s3_key_secret.file = ../../secrets/caddy_s3_key_secret.age;
systemd.services.caddy.serviceConfig.EnvironmentFile = config.age.secrets.caddy_s3_key_secret.path; systemd.services.caddy.serviceConfig.EnvironmentFile = config.age.secrets.caddy_s3_key_secret.path;
systemd.services.caddy.after = [ "garage.service" ]; # the cert store depends on garage
services.caddy = { services.caddy = {
enable = true; enable = true;
package = caddy; package = caddy;