zhaofengli / attic

Multi-tenant Nix Binary Cache
https://docs.attic.rs
Other
1.04k stars 79 forks source link

[bug] TOML parse error: missing field `jwt` #178

Closed diogotcorreia closed 1 month ago

diogotcorreia commented 1 month ago

Likely related to #177.

I'm passing the HS256 secret token through the ATTIC_SERVER_TOKEN_HS256_SECRET_BASE64 environment variable.

However, the aforementioned PR seems to have broken this, since there's now this error when building:

error: builder for '/nix/store/hxwj5wbvgpjl45dnl45lsz98y4jar72y-checked-attic-server.toml.drv' failed with exit code 1;
       last 25 log lines:
       > avg-size = 65536
       > max-size = 262144
       > min-size = 16384
       > nar-size-threshold = 65536
       >
       > [compression]
       > type = "zstd"
       >
       > [database]
       > url = "postgresql:///atticd"
       >
       > [garbage-collection]
       > default-retention-period = "7 days"
       > interval = "12 hours"
       >
       > [storage]
       > path = "/var/lib/atticd/storage"
       > type = "local"
       > Attic Server 0.1.0 (release)
       > Error: TOML parse error at line 1, column 1
       >   |
       > 1 | allowed-hosts = ["nix-cache.diogotc.com"]
       >   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       > missing field `jwt`
       >
       For full logs, run 'nix log /nix/store/hxwj5wbvgpjl45dnl45lsz98y4jar72y-checked-attic-server.toml.drv'.

My config: https://github.com/diogotcorreia/dotfiles/blob/0fb5f7f536be7568d5de5470ce213d2b0d45c38f/hosts/phobos/atticd.nix

I'm using the included nixos module from this repo, so I think that's not handling this change correctly.