mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-01-11 01:34:08 -05:00
API key secures the API, also fix the env templates there whew
This commit is contained in:
parent
436202842c
commit
2aed01c9a4
1 changed files with 17 additions and 14 deletions
|
|
@ -28,13 +28,17 @@ in
|
|||
sopsFile = "${sopsFolder}/services.yaml";
|
||||
};
|
||||
};
|
||||
|
||||
templates."actualbudget-env".content = ''
|
||||
ACTUAL_OPENID_DISCOVERY_URL=https://auth.wanderingcrow.net/.well-known/openid-configuration
|
||||
ACTUAL_OPENID_CLIENT_ID=${config.sops.placeholder."actualbudget/client-id"}
|
||||
ACTUAL_OPENID_CLIENT_SECRET=${config.sops.placeholder."actualbudget/client-secret"}
|
||||
ACTUAL_OPENID_SERVER_HOSTNAME=https://budget.wanderingcrow.net
|
||||
'';
|
||||
templates."actualbudget-api-env".content = ''
|
||||
ACTUAL_SERVER_PASSWORD="${config.sops.placeholder."actualbudget/pass"}"
|
||||
API_KEY="${config.sops.placeholder."actualbudget/key"}"
|
||||
ACTUAL_OPENID_DISCOVERY_URL="https://auth.wanderingcrow.net/.well-known/openid-configuration"
|
||||
ACTUAL_OPENID_CLIENT_ID="${config.sops.placeholder."actualbudget/client-id"}"
|
||||
ACTUAL_OPENID_CLIENT_SECRET="${config.sops.placeholder."actualbudget/client-secret"}"
|
||||
ACTUAL_OPENID_SERVER_HOSTNAME="https://budget.wanderingcrow.net"
|
||||
ACTUAL_SERVER_URL=https://budget.wanderingcrow.net
|
||||
ACTUAL_SERVER_PASSWORD=${config.sops.placeholder."actualbudget/pass"}
|
||||
API_KEY=${config.sops.placeholder."actualbudget/key"}
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
@ -44,11 +48,11 @@ in
|
|||
"budget.wanderingcrow.net".extraConfig = ''
|
||||
reverse_proxy http://10.88.0.12
|
||||
'';
|
||||
#"api.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
|
||||
#'';
|
||||
"api.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 = {
|
||||
|
|
@ -61,14 +65,13 @@ in
|
|||
environment = {
|
||||
ACTUAL_PORT = "80";
|
||||
};
|
||||
environmentFiles = [ config.sops.templates."actualbudget-env".path ];
|
||||
|
||||
};
|
||||
"actualbudget-api" = {
|
||||
image = "jhonderson/actual-http-api:25.10.0";
|
||||
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