Proper way to build a remote system with flakes

just a small neat note,

that your flake.nix and configuration.nix, doesn’t have to sit /etc/nixos/ , they can be anywhere that is supported flake repo type (git/svn/mercurial), as flakes are hermetically sealed (AFAIUSI). A system configuration can be built from anywhere now allowing you to do funky things with the flake URI. However to switch to the configuration, you will need to be stoopid user (superuser).

nix flake show github:nixinator/nothing/
nixos-rebuild dry-activate --flake github:nixinator/nothing/#z620

so you can build my ‘machine’. on yours. If that doesn’t blow new users minds, especially the infrastructure as code people… i don’t know want can.

This post will probably prompt me to do some janitorial work on my configs… or ‘nix shaving’ as we like to term it.

flake makes truly sharable operating system configurations possible, which last time i looked has never been possible.

However, hardware brings impurity, so my gfx card, network , containing that to impurity is something i’ve got to think about long term, but for a fleet of cattle, it’s a not really a problem.

3 Likes