1 files changed, 31 insertions, 0 deletions
diff --git a/nix/modules/default/cs/shared-config.nix b/nix/modules/default/cs/shared-config.nix
new file mode 100644
index 00000000..a5ca64f6
--- /dev/null
+++ b/nix/modules/default/cs/shared-config.nix
@@ -0,0 +1,31 @@
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
+
+let
+ secrets = import ../secrets.nix { inherit lib config; };
+ cfg = config.services.spacebarchat-server;
+ jsonFormat = pkgs.formats.json { };
+in
+{
+ options.services.spacebarchat-server.cs = lib.mkOption {
+ default = { };
+ description = "Configuration for C# cdn.";
+ type = lib.types.submodule {
+ options = {
+ defaultAppsettings = lib.mkOption {
+ type = jsonFormat.type;
+ default = import ./default-appsettings-json.nix;
+ description = "Extra appsettings.json configuration for all C#-based services.";
+ };
+ };
+ };
+ };
+
+ config = {
+ services.spacebarchat-server.cs.defaultAppsettings = import ./default-appsettings-json.nix;
+ };
+}
|