diff --git a/README.md b/README.md index 0d28482..ff58ed5 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,12 @@ # Installation -with disko-install - -```sh -sudo nixos-generate-config --root /tmp/config --no-filesystems -sudo nix run 'github:nix-community/disko/latest#disko-install' -- --flake '/tmp/config/etc/nixos#mymachine' --disk main /dev/sda -sudo nix run 'github:nix-community/disko/latest#disko-install' -- --flake "https://codeberg.org/muon/home#$(hostname)" --disk crypted /dev/disk/by-diskseq/1 -``` - - -without disko-install - ```sh +git clone https://codeberg.org/muon/home && cd home sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode destroy,format,mount hosts/$(hostname)/disk-config.nix -sudo mount -o subvol=/ /dev/mapper/crypted /mnt -sudo btrfs subvolume snapshot -r /mnt/root /mnt/root-blank +sudo btrfs subvolume snapshot -r /mnt /mnt/root-blank sudo nixos-generate-config --root /mnt -mkdir -p /mnt/home/muon/src -cd /mnt/home/muon/src -git clone https://codeberg.org/muon/home -cp /mnt/etc/nixos/hardware-configuration.nix /mnt/home/muon/src/home/hosts/$(hostname)/ -sudo nixos-install --root /mnt --no-root-passwd --flake /mnt/home/muon/src/home#$(hostname) -sudo umount -R /mnt -sudo cryptsetup close /dev/mapper/crypted +cp /mnt/etc/nixos/hardware-configuration.nix hosts/$(hostname)/hardware-configuration.nix +sudo nixos-install --root /mnt --no-root-passwd --flake .#$(hostname) ``` # Impermanence