The install of these configurations is best done from a fresh, minimal NixOS install. For this, download and flash the ISO onto a USB stick and boot from it.
The nix-config
contains a few helpful commands that aid in the CLI-based installation.
Thus, clone the repository with
git clone https://github.com/phdenzel/nix-config.git
Then, you can inspect the justfile
for the commands necessary for a proper installation.
cd nix-config
nix-shell -p just
just iso-install <my-machine>
where <my-machine>
has to be replaced with the name of an implemented host. So far,
idun
phinix
are implemented.
This will install and build a minimal fresh version of NixOS.
Log in to a NixOS installation as root and clone the repository once more:
git clone https://github.com/phdenzel/nix-config.git
cd nix-config
Then, make sure you have copied an authorized AGE key onto the machine to
~/.config/sops/age/keys.txt
To derive and register a new authorized key from the host SSH key
just host-age-key
Once all preparations are done, run
sudo nixos-rebuild switch --flake .#<my-machine>
where <my-machine>
has to be replaced with the name of an implemented host.
Alternatively, you can run the shorthand
just rbs <my-machine>
Modify and adapt further configuration as needed.