Added pushnix to awesome-nix
Hi,
For your information, i added pushnix to https://nix-community.github.io/awesome-nix/#deployment-tools via https://github.com/nix-community/awesome-nix/pull/78
Thank you.
After I initially wrote this it turned out I didn't have much need for it and I didn't end up using it. I can transfer the project to someone if they want to take it over, otherwise I'll just archive it.
Ok :confused:
Which solution do you use now ?
I switched to using flakes and can deploy to a remote-system using nixos-rebuild. Turned out that having my servers run auto-upgrade wasn't that important to me.
I don't know what is flakes (i assume this is not https://pypi.org/project/pyflakes/) which introduces it nicely for beginner ?
https://nixos.wiki/wiki/Flakes
Could you detail a little bit your approach here. As I understand it.
- You have on your remote machine a flake.nix file referencing your config that is inside a flake.
- sometimes you ssh into your remote machine and run
nix flake updateand thennixos-rebuild switch. I think I am missing something here. I also use flakes for my configuration, but I don't see how to deploy it on a remote without this 'hook' you created in pushnix. (I have something very similar, a git bare repo with a post-receive hook). I'm asking because I'm sure many people would be interested in your solution.
nixos-rebuild switch --flake .#<hostname> --build-host localhost --target-host <user>@<remote_host> --use-remote-sudo
Thanks a ton!
I just realized this command won't work for mac users. I guess then, that pushnix will mainly help mac users then. To then extent of my understanding, there is no other easy way to deploy a flake.