Update README.md

This commit is contained in:
Rouven Seifert 2023-02-17 15:08:24 +01:00 committed by GitHub
parent 0d08565be8
commit 99c39769ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,15 +6,37 @@ This repository contains the NixOS configuration files for FSR machines.
## Machines configures by this repository:
- `birne` (the printer notebook)
- `tomate` (backup endpoint and office computer)
- `quitte` (new server predestined to run all important services)
## Setup
Clone this repository on the target machine to `/var/src` and link the folder for the respective machine to the nixos configuration path, e.g.
Clone this repository on the target machine to `/etc/nixos` and build the desired host configuration e.g.
```bash
# you may need to delete the newly generated config, but make sure to update
# the `hardware-configuration.nix` file if necessary
# rm -rf /etc/nixos
ln -s /var/src/fruitbasket/birne /etc/nixos
# you may need to copy the generated hardware-configuration.nix to hosts/<hostname>/hardware-configuraion.nix
nixos-rebuild switch --flake .#<hostname>
```
## Tips and Tricks
<details>
<summary>Resolving merge conflicts in sops files</summary>
### Required steps
1. Manually resolve the conflicts in the encrypted file
2. Open the file using `sops --ignore-mac secrets/<hostname>.yml`
3. Change one letter in one of the yml entries to let sops know it has to regenerate the MAC
4. Close the file. Open it again and revert the change you just did in step 3.
</details>
<details>
<summary>DKIM Key generation</summary>
Commands to create the dkim key:
```bash
cd /var/lib/rspamd/dkim
```
```bash
DOMAIN=ifsr.de;rspamadm dkim_keygen -d "$DOMAIN" -s quitte -k "$DOMAIN".quitte.key >> "$DOMAIN".quitte.pub
```
</details>