Maybe I have to write the file with nix?

This commit is contained in:
Lillian Violet 2024-04-01 18:24:56 +02:00
parent 406ef2fd37
commit f57c4f03b4

View file

@ -6,13 +6,24 @@
... ...
}: let }: let
port = 2143; port = 2143;
configFile =
pkgs.writeText "config.json"
''
{
"defaultHomeserver": 2,
"homeserverList": [
"matrix.gladtherescake.eu"
],
"allowCustomHomeservers": false
}
'';
in { in {
#TODO: set default server and disable changing that #TODO: set default server and disable changing that
virtualisation.oci-containers.containers."cinny" = { virtualisation.oci-containers.containers."cinny" = {
autoStart = true; autoStart = true;
ports = ["${toString port}:80"]; ports = ["${toString port}:80"];
volumes = [ volumes = [
"./config.json:/app/config.json" "${configFile}:/app/config.json"
]; ];
image = "ajbura/cinny:latest"; image = "ajbura/cinny:latest";
}; };