forked from c3d2/nix-config
Add install instructions
This commit is contained in:
parent
5eba2dc00e
commit
314cd5c786
25
README.md
25
README.md
|
@ -246,11 +246,30 @@ For end user modules take a look at the [c3d2-user-module](https://gitea.c3d2.de
|
|||
|
||||
For the deployment options take a look at [deployment](https://gitea.c3d2.de/c3d2/deployment).
|
||||
|
||||
## ZFS setup
|
||||
|
||||
## Filesystem setup
|
||||
|
||||
Set the `disko` options for the machine and run:
|
||||
|
||||
```
|
||||
```shell
|
||||
$(nix build --print-out-paths --no-link -L '.#nixosConfigurations.HOSTNAME.config.system.build.diskoNoDeps')
|
||||
```
|
||||
|
||||
When adding new disks the paths under ``/dev/disk/by-id/`` should be used, so that the script is idempotent across device restarts.
|
||||
|
||||
## Install new server
|
||||
|
||||
- Copy the nix files from an existing, similar host
|
||||
- Disable all secrets after the installation is finished
|
||||
- set `simd.arch` option to the output of ``nix shell nixpkgs#gcc -c gcc -march=native -Q --help=target | grep march`` and update the comment next to it
|
||||
- If that returns `x86_64` search on a search engine for the `ark.intel.com` entry for the processor which can be found by catting ``/proc/cpuinfo``
|
||||
- Generate `networking.hostId` with ``head -c4 /dev/urandom | od -A none -t x4`` according to the options description.
|
||||
- Boot live ISO
|
||||
- Set a password for the NixOS user
|
||||
- `rsync` the this directory into the live system
|
||||
- generate and apply disk layout with disko
|
||||
- Generate ´hardware-configuration.nix`
|
||||
- Install nixos system
|
||||
- After a reboot add age key to sops-nix with ``nix shell nixpkgs#ssh-to-age`` and ``ssh-to-age < /etc/ssh/ssh_host_ed25519_key.pub``
|
||||
- Add ``/etc/machine-id`` to secrets
|
||||
- Enable and deploy secrets again
|
||||
- Commit everything and push
|
||||
|
|
Loading…
Reference in New Issue