refactor: store port as integer

This commit is contained in:
wi11-holdsworth 2025-12-29 14:00:36 +11:00
parent 0f2801f823
commit 4502e197bf
19 changed files with 64 additions and 93 deletions

View file

@ -1,9 +1,5 @@
{
lib,
...
}:
let
port = "5984";
port = 5984;
in
{
services = {
@ -12,7 +8,7 @@ in
databaseDir = "/srv/couchdb";
viewIndexDir = "/srv/couchdb";
configFile = "/srv/couchdb";
port = lib.toInt port;
inherit port;
extraConfig = {
chttpd = {
require_valid_user = true;
@ -41,7 +37,7 @@ in
nginx.virtualHosts."couchdb.fi33.buzz" = {
forceSSL = true;
useACMEHost = "fi33.buzz";
locations."/".proxyPass = "http://localhost:${port}";
locations."/".proxyPass = "http://localhost:${toString port}";
};
};
}