After installing NixOS on a new system, create a new directory inside
host
. Move the contents of /etc/nixos/
into the new directory inside
the newly created host instance directory and run chown
on them so that
you are the new owner.
Symlink both files back into /etc/nixos
via
sudo ln -s <full path>/hosts/<instance>/configuration.nix /etc/nixos/
sudo ln -s <full path>/hosts/<instance>/hardwaare-configuration.nix /etc/nixos/
Rebuild and switch
- Update files
sudo nixos-rebuild switch
- If successfull, commit changes to git
Documentation for possible options: https://nix-community.github.io/home-manager/options.xhtml