this post was submitted on 11 Aug 2025
1 points (100.0% liked)
Nix / NixOS
2761 readers
2 users here now
Main links
Videos
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I don't have an exact example to hand because I'm not using a custom substituter for now. I have a remnant of that in my config still, here: https://github.com/balsoft/nixos-config/blob/master/flake.nix#L5 . But it should be relatively straightforward: add
nix.settings.trusted-substituters = [ "http://your-substituter/" ];to your (client device) NixOS config (e.g. inconfiguration.nix); addnixConfig.extra-substituters = [ "http://your-substituter/" ];to your configflake.nix; answeryeswhen prompted bynixos-rebuild, and you should be good.As for remote builders, I don't really dig them myself. They require fully trusting all users who wish to build on them and are finicky to set up. Instead I just
sshinto the build machine, build whatever I need there, andnix copyit back to my laptop. That said,You can set up your nix-daemon to run as its own user nowadays, mitigating all issues related to root entirely.
Never had this issue so don't really know how to help
This one is pretty much unfixable due to how remote building works
You should probably use
nixos-rebuild switch --use-remote-sudoand run it as your user rather than root.