From f57c4f03b42e242a7b3150df72aefd20ed9b06e8 Mon Sep 17 00:00:00 2001 From: Lillian-Violet Date: Mon, 1 Apr 2024 18:24:56 +0200 Subject: [PATCH] Maybe I have to write the file with nix? --- nixos/server/package-configs/cinny/default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/nixos/server/package-configs/cinny/default.nix b/nixos/server/package-configs/cinny/default.nix index 827d627..41175e3 100644 --- a/nixos/server/package-configs/cinny/default.nix +++ b/nixos/server/package-configs/cinny/default.nix @@ -6,13 +6,24 @@ ... }: let port = 2143; + configFile = + pkgs.writeText "config.json" + '' + { + "defaultHomeserver": 2, + "homeserverList": [ + "matrix.gladtherescake.eu" + ], + "allowCustomHomeservers": false + } + ''; in { #TODO: set default server and disable changing that virtualisation.oci-containers.containers."cinny" = { autoStart = true; ports = ["${toString port}:80"]; volumes = [ - "./config.json:/app/config.json" + "${configFile}:/app/config.json" ]; image = "ajbura/cinny:latest"; };