summary refs log tree commit diff
path: root/nix/modules/default/cs/cdn-cs.nix
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-03-28 14:48:17 +0100
committerRory& <root@rory.gay>2026-03-28 14:48:17 +0100
commit3b74f1377c14cdac99dfeb1b45513c6c31ef378e (patch)
tree72176aa3a4a506bab4d16faebadc7c087ce84142 /nix/modules/default/cs/cdn-cs.nix
parentAdd indexes to instance bans table (diff)
downloadserver-ts-github/tmp-musl-fun.tar.xz
Attempt to switch test vm to musl? github/tmp-musl-fun tmp-musl-fun
Diffstat (limited to 'nix/modules/default/cs/cdn-cs.nix')
-rw-r--r--nix/modules/default/cs/cdn-cs.nix10
1 files changed, 6 insertions, 4 deletions
diff --git a/nix/modules/default/cs/cdn-cs.nix b/nix/modules/default/cs/cdn-cs.nix

index 42432dab..91d95b16 100644 --- a/nix/modules/default/cs/cdn-cs.nix +++ b/nix/modules/default/cs/cdn-cs.nix
@@ -13,7 +13,9 @@ let jsonFormat = pkgs.formats.json { }; in { - imports = [ ]; + imports = [ + ./shared-config.nix + ]; options.services.spacebarchat-server.cdnCs = lib.mkOption { default = { }; description = "Configuration for C# cdn."; @@ -22,7 +24,7 @@ in enable = lib.mkEnableOption "Enable experimental C# CDN."; extraConfiguration = lib.mkOption { type = jsonFormat.type; - default = import ./default-appsettings-json.nix; + default = { }; description = "Extra appsettings.json configuration for the gateway offload daemon."; }; }; @@ -35,7 +37,7 @@ in in { assertions = [ - (import ./assert-has-connection-string.nix "Admin API" cfg.adminApi.extraConfiguration) + (import ./assert-has-connection-string.nix "C# CDN" cfg) ]; systemd.services.spacebar-cdn = makeServerTsService { @@ -53,7 +55,7 @@ in CONFIG_READONLY = 1; ASPNETCORE_URLS = "http://0.0.0.0:${toString cfg.cdnEndpoint.localPort}"; STORAGE_LOCATION = cfg.cdnPath; - APPSETTINGS_PATH = jsonFormat.generate "appsettings.spacebar-cdn.json" (lib.recursiveUpdate (import ./default-appsettings-json.nix) cfg.cdnCs.extraConfiguration); + APPSETTINGS_PATH = jsonFormat.generate "appsettings.spacebar-cdn.json" (lib.recursiveUpdate cfg.cs.defaultAppsettings cfg.cdnCs.extraConfiguration); } ); serviceConfig = {