mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-01-11 01:34: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,
|
||||
...
|
||||
}: let
|
||||
|
|
@ -7,13 +7,32 @@
|
|||
in {
|
||||
systemd.tmpfiles.rules = [
|
||||
"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 = {
|
||||
enable = true;
|
||||
virtualHosts."budget.wanderingcrow.net".extraConfig = ''
|
||||
reverse_proxy http://10.88.0.12
|
||||
'';
|
||||
virtualHosts = {
|
||||
"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 = {
|
||||
backend = "podman";
|
||||
|
|
@ -26,6 +45,15 @@ in {
|
|||
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