Excellent read, thank you! Just in time, I have been eyeing one of those tinyminimicro pcs to replace OpenWRT with Nix.
Could you share more details on push_to_router.sh? Is it a wrapper around calling nixos-rebuild through ssh?
Could you share more details on push_to_router.sh? Is it a wrapper around calling nixos-rebuild through ssh?
tar -czf - nixconfig | ssh 192.168.1.1 \
'tar -zxf - && sudo cp -r ./nixconfig/* /etc/nixos/ && sudo nixos-rebuild --show-trace '"${rebuild_flag} ${name_flag}"nixos-rebuild --flake .#foo --target-host root@foo --build-host localhost switch
I keep the "master" key encrypted in pass passing it in a zsh's "=" subshell to agenix.