pushnix icon indicating copy to clipboard operation
pushnix copied to clipboard

Added pushnix to awesome-nix

Open pinage404 opened this issue 4 years ago • 9 comments

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

pinage404 avatar Apr 11 '21 12:04 pinage404

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.

arnarg avatar Apr 17 '21 09:04 arnarg

Ok :confused:

Which solution do you use now ?

pinage404 avatar Apr 17 '21 11:04 pinage404

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.

arnarg avatar Apr 17 '21 11:04 arnarg

I don't know what is flakes (i assume this is not https://pypi.org/project/pyflakes/) which introduces it nicely for beginner ?

pinage404 avatar Apr 17 '21 11:04 pinage404

https://nixos.wiki/wiki/Flakes

arnarg avatar Apr 17 '21 11:04 arnarg

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 update and then nixos-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.

happysalada avatar Apr 22 '21 06:04 happysalada

nixos-rebuild switch --flake .#<hostname> --build-host localhost --target-host <user>@<remote_host> --use-remote-sudo

arnarg avatar Apr 22 '21 08:04 arnarg

Thanks a ton!

happysalada avatar Apr 22 '21 08:04 happysalada

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.

happysalada avatar Apr 26 '21 00:04 happysalada