mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-01-11 01:34:08 -05:00
actualbudget-report
This commit is contained in:
parent
741b82a10d
commit
e41cdeb3b3
3 changed files with 143 additions and 31 deletions
|
|
@ -8,6 +8,12 @@ let
|
|||
sopsFolder = builtins.toString inputs.nix-secrets + "/sops";
|
||||
in
|
||||
{
|
||||
nixpkgs.overlays = [ inputs.actualbudget-report.overlays.default ];
|
||||
|
||||
imports = [
|
||||
inputs.actualbudget-report.nixosModules.default
|
||||
];
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d ${volumePath}/actualbudget"
|
||||
"d ${volumePath}/actualbudget-api"
|
||||
|
|
@ -24,22 +30,52 @@ in
|
|||
"actualbudget/client-id" = {
|
||||
sopsFile = "${sopsFolder}/services.yaml";
|
||||
};
|
||||
"actualbudget/recipients" = {
|
||||
sopsFile = "${sopsFolder}/services.yaml";
|
||||
};
|
||||
"actualbudget/client-secret" = {
|
||||
sopsFile = "${sopsFolder}/services.yaml";
|
||||
};
|
||||
"actualbudget/sync-id" = {
|
||||
sopsFile = "${sopsFolder}/services.yaml";
|
||||
};
|
||||
"generic/smtp/server" = {
|
||||
sopsFile = "${sopsFolder}/services.yaml";
|
||||
};
|
||||
"generic/smtp/port" = {
|
||||
sopsFile = "${sopsFolder}/services.yaml";
|
||||
};
|
||||
"generic/smtp/user" = {
|
||||
sopsFile = "${sopsFolder}/services.yaml";
|
||||
};
|
||||
"generic/smtp/pass" = {
|
||||
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_URL=https://budget.wanderingcrow.net
|
||||
ACTUAL_SERVER_PASSWORD=${config.sops.placeholder."actualbudget/pass"}
|
||||
API_KEY=${config.sops.placeholder."actualbudget/key"}
|
||||
'';
|
||||
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
|
||||
'';
|
||||
"actualbudget-api-env".content = ''
|
||||
ACTUAL_SERVER_URL=https://budget.wanderingcrow.net
|
||||
ACTUAL_SERVER_PASSWORD=${config.sops.placeholder."actualbudget/pass"}
|
||||
API_KEY=${config.sops.placeholder."actualbudget/key"}
|
||||
'';
|
||||
"actualbudget-report-env".content = ''
|
||||
BASE_URL=https://api.budget.wanderingcrow.net
|
||||
API_KEY=${config.sops.placeholder."actualbudget/key"}
|
||||
SYNC_ID=${config.sops.placeholder."actualbudget/sync-id"}
|
||||
SMTP_USERNAME=${config.sops.placeholder."generic/smtp/user"}
|
||||
SMTP_PASSWORD=${config.sops.placeholder."generic/smtp/pass"}
|
||||
SMTP_HOST=${config.sops.placeholder."generic/smtp/server"}
|
||||
SMTP_PORT=${config.sops.placeholder."generic/smtp/port"}
|
||||
SMTP_RECIPIENTS=${config.sops.placeholder."actualbudget/recipients"}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
services.caddy = {
|
||||
|
|
@ -76,4 +112,10 @@ in
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.actualbudget-report = {
|
||||
enable = true;
|
||||
interval = "Sun 12:00:00";
|
||||
environmentFile = config.sops.templates."actualbudget-report-env".path;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue