rework actual-budget to be more generic with test
This commit is contained in:
36
machines/b4l/services/actual-budget.nix
Normal file
36
machines/b4l/services/actual-budget.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{ config, ... }:
|
||||
let
|
||||
abDomain = "${config.clan.core.vars.generators.b4l-actual-budget.files.subdomain.value}.${config.networking.fqdn}";
|
||||
in
|
||||
{
|
||||
clan.core.vars.generators.b4l-actual-budget = {
|
||||
files.subdomain.secret = false;
|
||||
|
||||
prompts = {
|
||||
subdomain = {
|
||||
persist = true;
|
||||
type = "line";
|
||||
description = "Sub-domain for Actual Budget app. Default:(budget)";
|
||||
};
|
||||
};
|
||||
|
||||
script = ''cat $prompts/subdomain || echo -n "budget" > $out/subdomain'';
|
||||
};
|
||||
|
||||
services.actual = {
|
||||
settings = {
|
||||
allowedLoginMethods = [
|
||||
"password"
|
||||
"openid"
|
||||
];
|
||||
trustedProxies = [ "127.0.0.1" ];
|
||||
};
|
||||
};
|
||||
services.nginx.virtualHosts."${abDomain}" = {
|
||||
useACMEHost = "${config.networking.fqdn}";
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:${builtins.toString config.services.actual.settings.port}";
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user