This is my configuration for all my NixOS machines. Installation should be fairly simple.
- Boot into any NixOS installation medium on the new machine and run
nixos-generate-config --show-hardware-config
to see the necessary hardware config. Put these options into./machines/<hostname>/hardware.nix
. - Copy
machines/<hostname>/default.nix
from another host. - Create
machines/<hostname>/disko.nix
for filesystem config. - Add a section for the new machine in
flake.nix
and commit the changes. - Run
nix develop --command just build-iso-with-secrets
. - Copy the ISO file in
result/iso/
to a USB stick and boot it on the target machine. - Run
install-nixos-with-disko <hostname>
on the target machine. If it asks for a root password, just use something simple. - Reboot and cd into
/etc/nixos
. Runnix develop --command just post-install
. - Reboot and everything will now be installed and setup!
- Remember to delete the custom ISO from the USB, because it contains secret keys.
Some things are very difficult or impossible to configure declaratively.
You'll have login to your Google account with GNOME to access Google Calendar. You might be able to do this normally through the settings, but you might need to run WEBKIT_FORCE_SANDBOX=0 gnome-control-center online-accounts
to open the settings.
You'll have to login to Firefox to enable Firefox Sync. The device name should already be set up.
Firefox add-ons need to be manually enabled and configured. I won't enumerate all of my add-on settings here, but I'd recommend copying them from another machine.
You'll also have to add any rclone remotes manually. Then add the names of the remotes and their mountpoints to home-manager/flake.nix
.
Copy your sops age keys to ~/.config/sops/age/keys.txt
. The keys should be on separate lines.
Add your Cachix auth token with cachix authtoken "$(sudo cat /run/secrets/cachix/tokens/doctordalek1963)"