29 lines
647 B
Nix
29 lines
647 B
Nix
{ lib, config, ... }: {
|
|
|
|
imports = [
|
|
./acme.nix
|
|
];
|
|
|
|
options = {
|
|
actualBudget.enable = lib.mkEnableOption "enables actual-budget";
|
|
};
|
|
|
|
config = lib.mkIf config.actualBudget.enable {
|
|
|
|
services.actual.enable = true;
|
|
services.actual.settings.port = 5006;
|
|
|
|
# Open https port to the public
|
|
networking.firewall.allowedTCPPorts = [ 443 ];
|
|
|
|
# Make sure acme module is active for the "kyren.codes" ssl cert
|
|
acme.enable = true;
|
|
|
|
services.nginx.virtualHosts."budget.kyren.codes" = {
|
|
useACMEHost = "kyren.codes";
|
|
forceSSL = true;
|
|
locations."/".proxyPass = "http://localhost:5006/";
|
|
};
|
|
};
|
|
}
|