Boot into the NixOS installer.
Follow the NixOS manual up to the step of editing
configuration.nix
.Set up the initial NixOS configuration file:
On a machine with git push access, create a basic config (a recent example), and push it to GitHub.
On the new machine, set up
/mnt/etc/nixos
:nix-env --install git cd /mnt/etc/nixos git clone https://github.com/barrucadu/nixfiles.git mv nixos/* nixos/.* . rmdir nixos ln -s hosts/HOSTNAME host mv hardware-configuration.nix host/hardware.nix
Continue with the NixOS installation instructions, and reboot into the installed OS.
Set up the user environment: NixOS machines generally have ssh and private git access.
Change the
barrucadu
password and add the new password to KeePassXC.Disable the root account:
sudo passwd -l root
Change ownership of
/etc/nixos
tobarrucadu
:sudo chown -R barrucadu.users /etc/nixos
Commit and push
hardware.nix
:cd /etc/nixos git add . git commit -m "[HOSTNAME] Commit generated hardware.nix" git remote rm origin git remote add origin git@github.com:barrucadu/nixfiles.git git push -u origin master