I’m trying to use a selfhosted binary cache using attic in my tailnet. But something seems to be going wrong with the signing/verification when pulling from the cache on one of my machines.
warning: ignoring substitute for '/nix/store/kxd9crfs6faf3a5bbscq0niybflz5j7n-hm_homejordy.cache.keep' from 'http://attic.tailnet.domain/homelab', as it's not signed by any of the keys in 'trusted-public-keys'
warning: ignoring substitute for '/nix/store/0yw7maw8h39n70yph4da5jv35m9i7vyl-hm_homejordy.localstate.keep' from 'http://attic.tailnet.domain/homelab', as it's not signed by any of the keys in 'trusted-public-keys'
warning: ignoring substitute for '/nix/store/ck1ccknr7gc0ffi7532vnbc8c6h9s892-hm_systemduserappcom.mitchellh.ghostty.service.doverrides.conf' from 'http://attic.tailnet.domain/homelab', as it's not signed by any of the keys in 'trusted-public-keys'
warning: ignoring substitute for '/nix/store/dvmk1qxj8ih2sc5c62wn726f1pfsgrnx-hm_usertmpfiles.dhomemanager.conf' from 'http://attic.tailnet.domain/homelab', as it's not signed by any of the keys in 'trusted-public-keys'
I have the key added to my extra substituters list in flake.nix. And when rebuilding nix asked if I wanted to permanently mark the keys as trusted which I did. I have also checked /root/.local/share/nix/trusted-setting.json and the key appears to be in there correctly.
nixConfig = {
extra-substituters = [
"https://nix-community.cachix.org"
"https://cuda-maintainers.cachix.org"
"https://vicinae.cachix.org"
"http://attic.tailnet.domain/homelab"
];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
"vicinae.cachix.org-1:1kDrfienkGHPYbkpNj1mWTr7Fm1+zcenzgTizIcI3oc="
"homelab:D1PU3pJIzLurAwTg3aJllxtHe/MtL3TYVc4y9q/2sZU="
];
};
The key appears to be the correct key for the attic cache. I’m not sure if the issue here lies with my nix configuration or with attic, and am not sure how to verify it.
❯ attic cache info homelab
Public: true
Public Key: homelab:D1PU3pJIzLurAwTg3aJllxtHe/MtL3TYVc4y9q/2sZU=
Binary Cache Endpoint: http://attic.tailnet.domain/homelab
API Endpoint: http://attic.tailnet.domain/
Store Directory: /nix/store
Priority: 41
Upstream Cache Keys: ["cache.nixos.org-1"]
Retention Period: Global Default
I’ve also checked the configuration generated by attic use on the machine I pushed to the cache from, and it seems to match my nix config.
access-tokens = github.com=*snip*
substituters = http://attic.tailnet.domain/homelab https://cache.nixos.org
trusted-public-keys = homelab:D1PU3pJIzLurAwTg3aJllxtHe/MtL3TYVc4y9q/2sZU= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
netrc-file = /home/jordy/.config/nix/netrc