Installing to a second machine with existing config

I recently got NixOS running on one computer and fell in love with declarative configuration. I wanna put it on my secondary computer aswell but I’m just anxious to do it for some reason, like worried something will go wrong.

Can I just…?

  1. Install with the graphical installer ISO
  2. Set hostname, add git package and flake support to the initial default config and rebuild once
  3. Clone my repo, move hardware-config in place and build the proper flake config and it should work?

Or is there an even easier/faster way?

Currently using the “enne” machine and my much lighter weight laptop “kivi” needs installation GitHub - jhiltu/nixos-config: My NixOS config with Flakes and Home-manager

You can do that. Or you can use nixosConfigurations flake output (wiki link) to declare multiple machines in one flake.