Compare commits

...

6 commits
v2.0 ... main

Author SHA1 Message Date
TheWanderingCrow
eb74f08b2c add hydraJobs to flake 2026-01-30 16:17:51 -05:00
3da46bd0a7 chore: Update README.md 2026-01-20 15:44:39 -05:00
TheWanderingCrow
874eb0eff1 chore: v2.0.2 release 2026-01-20 15:40:08 -05:00
TheWanderingCrow
dc093bcade fix: fix regressions 2026-01-20 15:36:25 -05:00
TheWanderingCrow
215a0fde7c chore: flake updates for v2.0.1 release 2026-01-20 10:43:59 -05:00
TheWanderingCrow
c394af7127 fix: comply to two digit months as per API wanting YYYY-MM 2026-01-18 22:33:19 -05:00
3 changed files with 15 additions and 5 deletions

View file

@ -26,6 +26,7 @@ sops.templates."actualbudget-report-env".content = ''
SMTP_USERNAME= SMTP_USERNAME=
SMTP_PASSWORD= SMTP_PASSWORD=
SMTP_HOST= SMTP_HOST=
SMTP_PORT=
SMTP_RECIPIENTS= SMTP_RECIPIENTS=
BUDGET_ENCRYPTION_KEY= BUDGET_ENCRYPTION_KEY=
''; '';

View file

@ -24,7 +24,15 @@
"aarch64-darwin" "aarch64-darwin"
"x86_64-darwin" "x86_64-darwin"
]; ];
flake.nixosModules.default = ./modules/actualbudget-report; flake = {
nixosModules.default = ./modules/actualbudget-report;
hydraJobs = {
inherit (self)
packages
;
};
};
perSystem = perSystem =
{ {
config, config,
@ -42,8 +50,8 @@
domain = "git.wanderingcrow.net"; domain = "git.wanderingcrow.net";
owner = "TheWanderingCrow"; owner = "TheWanderingCrow";
repo = "actualbudget-report"; repo = "actualbudget-report";
rev = "v1.0"; rev = "v2.0.2";
hash = "sha256-rt4wiSzsNqmSWGoMBf6fiNpCxZfEPwYlZuClLI+s+A4="; hash = "sha256-vnd1RvlMD4WOLtXpIOiPxuDxvHoBQVTP/8l/OMWR5No=";
}; };
vendorHash = "sha256-NHTKwUSIbNCUco88JbHOo3gt6S37ggee+LWNbHaRGEs="; vendorHash = "sha256-NHTKwUSIbNCUco88JbHOo3gt6S37ggee+LWNbHaRGEs=";
}; };

View file

@ -114,13 +114,14 @@ func (b BudgetClient) BankSync() bool {
func (b BudgetClient) GetBudgetMonths() *BudgetMonthsResponse { func (b BudgetClient) GetBudgetMonths() *BudgetMonthsResponse {
currentTime := time.Now() currentTime := time.Now()
year, month := currentTime.Year(), int(currentTime.Month()) year, month := currentTime.Year(), int(currentTime.Month())
budgetMonth := fmt.Sprintf("%v-%v", year, month) budgetMonth := fmt.Sprintf("%v-%02d", year, month)
resp := b.callApi("GET", "/months/"+budgetMonth, map[string]string{ resp := b.callApi("GET", "/months/"+budgetMonth, map[string]string{
"budget-encryption-password": b.encryptionKey, "budget-encryption-password": b.encryptionKey,
}) })
defer resp.Body.Close() defer resp.Body.Close()
if resp.StatusCode != http.StatusOK { if resp.StatusCode != http.StatusOK {
log.Fatal("GetBudgetAmounts failed with: " + string(resp.Status)) temp, _ := io.ReadAll(resp.Body)
log.Fatal("GetBudgetAmounts failed with: " + string(resp.Status) + " " + string(temp))
} }
var data bytes.Buffer var data bytes.Buffer