nix-community / raspberry-pi-nix

NixOS modules to aid in configuring NixOS for raspberry pi products
MIT License
144 stars 34 forks source link

Cachix isn't used when building the template configuration #8

Closed loutr closed 6 months ago

loutr commented 6 months ago

Hello! Just came across your project and I wanted to thank you for your nice work.

So, I've been trying to use it in the config of my RPi3B, but upon building I realised the cachix instance didn't provide the kernel package (6.1.63), which made the build quite endless.

I tried again building the default configuration provided in the readme, alone, and the exact same thing happened. Can someone confirm that the cache does or doesn't work?

Thanks

RCMast3r commented 6 months ago

I can confirm, I am running into the same issue.

tstat commented 6 months ago

Hello! In the past I have only pushed stuff to cachix when I cut a release, but I'm happy to push linux 6.1.63 to cachix now. I need to cut a new release soon, just need to dedicate some time to updating the readme and the example repo.

I pushed linux 6.1.63 to cachix. Let me know if you run into any other trouble.

RCMast3r commented 6 months ago

hello! I just tried your example again and I ran into the issue again.

tstat commented 6 months ago

Sorry, I'm sure there's a difference in our kernel dependencies. raspberry-pi-nix provides only overlays and modules, but doesn't pin a version of nixpkgs, so our kernel dependencies are likely different.

I pushed /nix/store/8x5wf0dh45yn9b16cqx12bl8r57hjrdq-linux-6.1.63 to cachix. This is the version given with a 1 month old nixpkgs commit from the latest stable branch (nixos-23.11). I have pinned this version in the latest commit of the example repo, so you could use the nixpkgs input from that flake to hit this cached linux build.

You can check your linux hash with nix path-info .#nixosConfigurations.<YOUR_CONFIG_NAME>.config.boot.kernelPackages.kernel.

I'll leave this open until we confirm that things are working for you all.

RCMast3r commented 6 months ago

Thank you so much for helping us with this!

I swapped over to trying out your example repo and narrowed it down to my local setup not using the cache in the first place due to a trusted-users issue on my end (I am using the nix package manager on regular Ubuntu) as the root user and the user you are trying to add to the trusted-users list has to be in the list in nix.conf. I swapped extra-substituters to trusted-substituters in an attempt to get around it but made it silently fail to pull from your cache.

After fixing this issue I am happy to report that I am pulling everything from your cachix and I have a working nix build❤

RCMast3r commented 6 months ago

I can make a PR to add a blurb about this in your README if you would like

tstat commented 6 months ago

Ok great, glad you got it working. PRs improving the README are welcome.

loutr commented 6 months ago

Works like a charm for me too :)