summary refs log tree commit diff
path: root/nix/modules/default/cs/offload-cs.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix/modules/default/cs/offload-cs.nix')
-rw-r--r--nix/modules/default/cs/offload-cs.nix12
1 files changed, 6 insertions, 6 deletions
diff --git a/nix/modules/default/cs/offload-cs.nix b/nix/modules/default/cs/offload-cs.nix

index 9186edcb..e1f1fd9b 100644 --- a/nix/modules/default/cs/offload-cs.nix +++ b/nix/modules/default/cs/offload-cs.nix
@@ -14,7 +14,9 @@ let jsonFormat = pkgs.formats.json { }; in { - imports = [ ]; + imports = [ + ./shared-config.nix + ]; options.services.spacebarchat-server.offload = lib.mkOption { default = { }; description = "Configuration for C# offload daemon."; @@ -28,7 +30,7 @@ in }; extraConfiguration = lib.mkOption { type = jsonFormat.type; - default = import ./default-appsettings-json.nix; + default = { }; description = "Extra appsettings.json configuration for the offload daemon."; }; gateway = lib.mkOption { @@ -54,7 +56,7 @@ in in { assertions = [ - (import ./assert-has-connection-string.nix "Gateway Offload" offloadCfg.extraConfiguration) + (import ./assert-has-connection-string.nix "Gateway Offload" cfg) ]; services.spacebarchat-server.settings.offload = { @@ -83,9 +85,7 @@ in CONFIG_READONLY = 1; ASPNETCORE_URLS = "http://0.0.0.0:${toString offloadCfg.listenPort}"; STORAGE_LOCATION = cfg.cdnPath; - APPSETTINGS_PATH = jsonFormat.generate "appsettings.spacebar-offload.json" ( - lib.recursiveUpdate (import ./default-appsettings-json.nix) offloadCfg.extraConfiguration - ); + APPSETTINGS_PATH = jsonFormat.generate "appsettings.spacebar-offload.json" (lib.recursiveUpdate cfg.cs.defaultAppsettings offloadCfg.extraConfiguration); } ); serviceConfig = {