trofi / nix-guix-gentoo

Gentoo overlay for nix and guix functional package managers.
110 stars 9 forks source link

Guix daemon is not able to use substitutes #47

Closed Arian-D closed 7 months ago

Arian-D commented 7 months ago

Hi!

I installed Guix via your overlay, and the process went very smoothly. The only issue I'm facing at the moment is that Guix is building everything, and I actually want to use the pre-compiled binaries from Guix substitutes (going against the nature of Gentoo :sweat_smile:).

I tried to modify the guix-daemon openrc service by adding the --substitute-urls=... and also appending it to commands like guix pull, but I'm greeted with this warning about ACLs not being initialized.

$ guix pull --substitute-urls="https://ci.guix.gnu.org"
Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
Authenticating channel 'guix', commits 9edb3f6 to a8353e9 (24 new commits)...
Building from this channel:
  guix      https://git.savannah.gnu.org/git/guix.git   a8353e9
substitute: guix substitute: warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
...

I couldn't find anything on the Guix docs about this, so I didn't know what the issue was.

Arian-D commented 7 months ago

Update: either it was because I hadn't emerged sys-apps/acl prior to installing Guix, or I hadn't trusted Guix's public keys the first time (most likely the latter), but unmerging and reinstalling it again seemed to have fixed it.

Thank you, again! I'll close this issue.

trofi commented 7 months ago

Yeah, it sounds like a missing cache key. ebuild tries to dvertise it as https://github.com/trofi/nix-guix-gentoo/blob/f645bad67a674e27c552cc0e4b194aa5b2c494c2/sys-apps/guix/guix-1.4.0-r4.ebuild#L97:

[as root] allow binary substitution to be downloaded (optional)
    # guix archive --authorize < /usr/share/guix/ci.guix.gnu.org.pub

We'll need add it to the README.md as well.

trofi commented 7 months ago

Documented as https://github.com/trofi/nix-guix-gentoo/commit/1d35d7bbd4d49f9c41f8c45bfc694ac56c7aed0f

Thank you for the report!