Update NixOS

Tibo De Peuter 2023-10-18 21:39:17 +02:00
parent 338ea40297
commit 2f3fdb20a7

@ -6,6 +6,8 @@ I used [this guide](https://nixos.wiki/wiki/Wil_T_Nix_Guides) so if you follow a
Depending on how you're feeling today, you should prepare an installation medium with either the graphical or minimal installer.
### Configuring disks
```
fdisk -l
fdisk /dev/sdx
@ -21,10 +23,9 @@ mount /dev/disk/by-label/NIX-BOOT /mnt/boot/efi
swapon /dev/disk/by-label/SWAP
```
<details>
<summary>If you do not have an existing configuration repository.</summary>
### Using `nixos-generate-config`
(Automatically) generate a basic config using:
If you do not have an existing configuration repository, or you just want to start from scratch, (automatically) generate a basic config using:
```
nixos-generate-config --root /mnt
@ -42,9 +43,9 @@ Then you can `cd /mnt` and `nixos-install`. When the installation is successful,
Afterwards, you should change the password of your user. Then you can choose to build your configuration from here or integrate with an existing configuration.
</details>
<details>
<summary>If you have a repository and you want to 'clone' an existing machine using flakes.</summary>
### Using existing flake
If you have a repository and you want to 'clone' an existing machine using [flakes](https://nixos.wiki/wiki/Flakes).
Clone your repository and go inside the folder containing the `flake.nix` file.
@ -58,6 +59,4 @@ Alternatively, if you don't want to clone the repository first:
nixos-install --flake https://<url_to_your_repo>#<hostname>
```
It is possible that you might have to append `--experimental-features nix-command --experimental-feautres flakes` if your system does not have those options enabled yet.
</details>
It is possible that you might have to append `--experimental-features 'nix-command flakes'` if your system does not have those options enabled yet.