2023-12-20 11:43:17 +01:00
|
|
|
## Step by step
|
2023-12-20 11:27:50 +01:00
|
|
|
1. Boot the [installer](https://nixos.org/download.html#nixos-iso)
|
|
|
|
|
|
|
|
2. Get disk name
|
2023-12-20 11:43:17 +01:00
|
|
|
```
|
|
|
|
$ lsblk
|
|
|
|
```
|
2023-12-20 11:27:50 +01:00
|
|
|
|
|
|
|
3. Get disko config
|
|
|
|
```
|
|
|
|
$ curl https://git.kabtop.de/Kabbone/nixos-config/raw/branch/main/disko/btrfs_luks.nix -o /tmp/disko-config.nix
|
|
|
|
```
|
|
|
|
|
|
|
|
4. Adjust device name
|
|
|
|
|
|
|
|
5. Let disko partition the disk
|
|
|
|
```
|
|
|
|
$ sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko -- --mode disko /tmp/disko-config.nix
|
|
|
|
```
|
|
|
|
|
|
|
|
6. Check if it got mounted
|
2023-12-20 11:43:17 +01:00
|
|
|
```
|
|
|
|
$ mount | grep /mnt
|
|
|
|
```
|
2023-12-20 11:27:50 +01:00
|
|
|
|
|
|
|
7. Continue with NixOS installation
|
|
|
|
Filesystem definitions come from disko, hence "--no-filesystems"
|
|
|
|
```
|
|
|
|
$ nixos-generate-config --no-filesystems --root /mnt
|
|
|
|
$ mv /tmp/disko-config.nix /mnt/etc/nixos
|
2023-12-20 11:43:17 +01:00
|
|
|
```
|
|
|
|
|
2023-12-20 11:45:24 +01:00
|
|
|
**Alternative:** continue with normal hardware-config
|
2023-12-20 11:43:17 +01:00
|
|
|
```
|
|
|
|
$ nixos-generate-config --root /mnt
|
|
|
|
```
|
|
|
|
|