blob: e3d8bbdfde3aeb06c609b6549803faf56a86ede2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#!/usr/bin/env bash
MACHINE=x
sudo mkdir -v /mnt/persist/system
sudo cp -rv * /mnt/config
sudo nixos-generate-config --root /mnt --no-filesystems
cd /mnt/config
sudo mv -v /mnt/etc/nixos/hardware-configuration.nix machines/$MACHINE/hardware-configuration.nix
sudo rm -rfv /mnt/etc
sudo nixos-install --root /mnt --no-root-password --flake .#$MACHINE
|