nixos/vikunja: add 'port' option

Changed files
+7 -1
nixos
modules
services
web-apps
+7 -1
nixos/modules/services/web-apps/vikunja.nix
···
type = types.str;
description = lib.mdDoc "The Hostname under which the frontend is running.";
};
settings = mkOption {
type = format.type;
···
inherit (cfg.database) type host user database path;
};
service = {
frontendurl = "${cfg.frontendScheme}://${cfg.frontendHostname}/";
};
files = {
···
tryFiles = "try_files $uri $uri/ /";
};
"~* ^/(api|dav|\\.well-known)/" = {
-
proxyPass = "http://localhost:3456";
extraConfig = ''
client_max_body_size 20M;
'';
···
type = types.str;
description = lib.mdDoc "The Hostname under which the frontend is running.";
};
+
port = mkOption {
+
type = types.port;
+
default = 3456;
+
description = lib.mdDoc "The TCP port exposed by the API.";
+
};
settings = mkOption {
type = format.type;
···
inherit (cfg.database) type host user database path;
};
service = {
+
interface = ":${toString cfg.port}";
frontendurl = "${cfg.frontendScheme}://${cfg.frontendHostname}/";
};
files = {
···
tryFiles = "try_files $uri $uri/ /";
};
"~* ^/(api|dav|\\.well-known)/" = {
+
proxyPass = "http://localhost:${toString cfg.port}";
extraConfig = ''
client_max_body_size 20M;
'';