Fava, change port to number; open port
This commit is contained in:
parent
a2939e5613
commit
5c996e0885
2 changed files with 5 additions and 3 deletions
|
|
@ -67,7 +67,7 @@ in {
|
||||||
|
|
||||||
fava = {
|
fava = {
|
||||||
enable = true;
|
enable = true;
|
||||||
port = "5128";
|
port = 5128;
|
||||||
};
|
};
|
||||||
|
|
||||||
syncthing = {
|
syncthing = {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
ledgerFiles = lib.mkOption {
|
ledgerFiles = lib.mkOption {
|
||||||
default = ["/var/lib/fava/ledger.beancount"];
|
default = ["/var/lib/fava/ledger.beancount"];
|
||||||
};
|
};
|
||||||
port = lib.mkOption { default = "5000"; };
|
port = lib.mkOption { default = 5000; };
|
||||||
host = lib.mkOption { default = "localhost"; };
|
host = lib.mkOption { default = "localhost"; };
|
||||||
favaHome = lib.mkOption { default = "/var/lib/fava"; };
|
favaHome = lib.mkOption { default = "/var/lib/fava"; };
|
||||||
};
|
};
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
ExecStart = with config.fava; let
|
ExecStart = with config.fava; let
|
||||||
command = lib.concatStringsSep " " ([
|
command = lib.concatStringsSep " " ([
|
||||||
"${pkgs.fava}/bin/fava"
|
"${pkgs.fava}/bin/fava"
|
||||||
"--port ${port}"
|
"--port ${builtins.toString port}"
|
||||||
"--host ${host}"
|
"--host ${host}"
|
||||||
] ++ ["--"] ++ ledgerFiles);
|
] ++ ["--"] ++ ledgerFiles);
|
||||||
in command;
|
in command;
|
||||||
|
|
@ -39,6 +39,8 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ config.fava.port ];
|
||||||
|
|
||||||
users.users.fava = {
|
users.users.fava = {
|
||||||
home = config.fava.favaHome;
|
home = config.fava.favaHome;
|
||||||
createHome = true;
|
createHome = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue