diff --git a/hosts/server/hikari/hako/configuration.nix b/hosts/server/hikari/hako/configuration.nix index 8714a24..4158120 100644 --- a/hosts/server/hikari/hako/configuration.nix +++ b/hosts/server/hikari/hako/configuration.nix @@ -44,6 +44,16 @@ networking.firewall.enable = false; + # /dev/sdd1 (ext4, UUID efdf753d-282c-4b78-9549-a124b353c6a5) + fileSystems."/mnt/static" = { + device = "/dev/disk/by-uuid/efdf753d-282c-4b78-9549-a124b353c6a5"; + fsType = "ext4"; + }; + + systemd.tmpfiles.rules = [ + "L+ /var/static - - - - /mnt/static/static" + ]; + networking.hostName = "hako"; system.stateVersion = "26.05"; } diff --git a/hosts/server/hikari/hako/services/caddy.nix b/hosts/server/hikari/hako/services/caddy.nix index 62ef465..0a95395 100644 --- a/hosts/server/hikari/hako/services/caddy.nix +++ b/hosts/server/hikari/hako/services/caddy.nix @@ -368,8 +368,12 @@ in }; }; - systemd.services.caddy.serviceConfig = { - RuntimeDirectory = "caddy"; - RuntimeDirectoryMode = "0755"; + systemd.services.caddy = { + requires = [ "mnt-static.mount" ]; + after = [ "mnt-static.mount" "systemd-tmpfiles-setup.service" ]; + serviceConfig = { + RuntimeDirectory = "caddy"; + RuntimeDirectoryMode = "0755"; + }; }; }