Fix install commands

This commit is contained in:
muon 2025-07-31 01:23:56 +00:00
parent b4f998d455
commit 97fddca4a4

View file

@ -1,28 +1,12 @@
# Installation # 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 ```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 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 /mnt/root-blank
sudo btrfs subvolume snapshot -r /mnt/root /mnt/root-blank
sudo nixos-generate-config --root /mnt sudo nixos-generate-config --root /mnt
mkdir -p /mnt/home/muon/src cp /mnt/etc/nixos/hardware-configuration.nix hosts/$(hostname)/hardware-configuration.nix
cd /mnt/home/muon/src sudo nixos-install --root /mnt --no-root-passwd --flake .#$(hostname)
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
``` ```
# Impermanence # Impermanence