Update NixOS
parent
338ea40297
commit
2f3fdb20a7
1 changed files with 8 additions and 9 deletions
17
NixOS.md
17
NixOS.md
|
|
@ -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.
|
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 -l
|
||||||
fdisk /dev/sdx
|
fdisk /dev/sdx
|
||||||
|
|
@ -21,10 +23,9 @@ mount /dev/disk/by-label/NIX-BOOT /mnt/boot/efi
|
||||||
swapon /dev/disk/by-label/SWAP
|
swapon /dev/disk/by-label/SWAP
|
||||||
```
|
```
|
||||||
|
|
||||||
<details>
|
### Using `nixos-generate-config`
|
||||||
<summary>If you do not have an existing configuration repository.</summary>
|
|
||||||
|
|
||||||
(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
|
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.
|
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>
|
### Using existing flake
|
||||||
<details>
|
|
||||||
<summary>If you have a repository and you want to 'clone' an existing machine using flakes.</summary>
|
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.
|
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>
|
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.
|
It is possible that you might have to append `--experimental-features 'nix-command flakes'` if your system does not have those options enabled yet.
|
||||||
|
|
||||||
</details>
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue