mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-01-11 09:44:08 -05:00
actualbudget http api
This commit is contained in:
parent
d2bb20ca0d
commit
41cf24637a
1 changed files with 32 additions and 4 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
inputs,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
|
@ -7,13 +7,32 @@
|
||||||
in {
|
in {
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"d ${volumePath}/actualbudget"
|
"d ${volumePath}/actualbudget"
|
||||||
|
"d ${volumePath}/actualbudget-api"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
sops = {
|
||||||
|
secrets = {
|
||||||
|
"actualbudget/pass" = {};
|
||||||
|
"actualbudget/key" = {};
|
||||||
|
};
|
||||||
|
templates."actualbudget-api-env".content = ''
|
||||||
|
ACTUAL_SERVER_PASSWORD="${config.sops.placeholder."actualbudget/pass"}"
|
||||||
|
API_KEY="${config.sops.placeholder."actualbudget/key"}"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
services.caddy = {
|
services.caddy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
virtualHosts."budget.wanderingcrow.net".extraConfig = ''
|
virtualHosts = {
|
||||||
reverse_proxy http://10.88.0.12
|
"budget.wanderingcrow.net".extraConfig = ''
|
||||||
'';
|
reverse_proxy http://10.88.0.12
|
||||||
|
'';
|
||||||
|
"docs.budget.wanderingcrow.net".extraConfig = ''
|
||||||
|
@block not remote_ip ${inputs.nix-secrets.network.primary.publicIP} private_ranges
|
||||||
|
abort @block
|
||||||
|
reverse_proxy http://10.88.0.13:5007
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
virtualisation.oci-containers = {
|
virtualisation.oci-containers = {
|
||||||
backend = "podman";
|
backend = "podman";
|
||||||
|
|
@ -26,6 +45,15 @@ in {
|
||||||
ACTUAL_PORT = "80";
|
ACTUAL_PORT = "80";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
"actualbudget-api" = {
|
||||||
|
image = "jhonderson/actual-http-api:latest";
|
||||||
|
volumes = ["${volumePath}/actualbudget-api:/data"];
|
||||||
|
extraOptions = ["--ip=10.88.0.13"];
|
||||||
|
environment = {
|
||||||
|
ACTUAL_SERVER_URL = "http://10.88.0.12";
|
||||||
|
};
|
||||||
|
environmentFiles = [config.sops.templates."actualbudget-api-env".path];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue