Fava, change port to number; open port

This commit is contained in:
Julia Lange 2025-09-16 17:35:34 -07:00
parent a2939e5613
commit 5c996e0885
Signed by: Julia
SSH key fingerprint: SHA256:50XUMcOFYPUs9/1j7p9SPnwASZ7QnxXm7THF7HkbqzQ
2 changed files with 5 additions and 3 deletions

View file

@ -67,7 +67,7 @@ in {
fava = {
enable = true;
port = "5128";
port = 5128;
};
syncthing = {

View file

@ -6,7 +6,7 @@
ledgerFiles = lib.mkOption {
default = ["/var/lib/fava/ledger.beancount"];
};
port = lib.mkOption { default = "5000"; };
port = lib.mkOption { default = 5000; };
host = lib.mkOption { default = "localhost"; };
favaHome = lib.mkOption { default = "/var/lib/fava"; };
};
@ -21,7 +21,7 @@
ExecStart = with config.fava; let
command = lib.concatStringsSep " " ([
"${pkgs.fava}/bin/fava"
"--port ${port}"
"--port ${builtins.toString port}"
"--host ${host}"
] ++ ["--"] ++ ledgerFiles);
in command;
@ -39,6 +39,8 @@
};
};
networking.firewall.allowedTCPPorts = [ config.fava.port ];
users.users.fava = {
home = config.fava.favaHome;
createHome = true;