Add onlyoffice secret conf
Some checks failed
/ Build Nix targets (push) Failing after 1m53s

This commit is contained in:
Théo Barnouin 2025-01-08 09:21:06 +01:00
parent 470c42f8d0
commit 94022737a0

View file

@ -11,6 +11,16 @@ in
}; };
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
age.secrets = {
office-dbpass = {
file = ./secrets/office-dbpass.age;
owner = "onlyoffice";
};
office-jwtpass = {
file = ./secrets/office-jwtpass.age;
owner = "onlyoffice";
};
};
services = { services = {
onlyoffice = { onlyoffice = {
enable = true; enable = true;
@ -19,10 +29,10 @@ in
postgresName = "onlyoffice"; postgresName = "onlyoffice";
postgresHost = "${cfg.pgsql_ip}"; postgresHost = "${cfg.pgsql_ip}";
postgresUser = "onlyoffice"; postgresUser = "onlyoffice";
postgresPasswordFile = "/run/secrets/onlyoffice/office-dbpass"; postgresPasswordFile = config.age.secrets.office-dbpass.path;
jwtSecretFile = "/run/secrets/onlyoffice/office-jwtpass"; jwtSecretFile = config.age.secrets.office-jwtpass.path;
}; };
}; };
networking.firewall.allowedTCPPorts = [ 8000 ]; networking.firewall.allowedTCPPorts = [ 80 4369 5432 5672 6379 8000 8080 ];
}; };
} }