My NixOS configuration
| assets | ||
| home | ||
| modules/nixos | ||
| nixos | ||
| pkgs | ||
| .gitignore | ||
| .sops.yaml | ||
| flake.lock | ||
| flake.nix | ||
| justfile | ||
| README.md | ||
fyrk's NixOS configuration
Structure
home/: Home Manager configuration; rebuild withjust hmsnixos/: NixOS configuration for various systems, see below for a list; rebuild current system withjust norsand remote system withjust build <hostname>nixos/_universal/: configuration common to all systemsnixos/_personal/: configuration specific to personal devicesnixos/_server/: configuration specific to servers
pkgs/: custom Nix packagesmodules/: custom modulesmodules/nixos/: custom NixOS modules
Devices
| Name | Description | OS | Hardware |
|---|---|---|---|
| fluorine | main laptop | NixOS | Dell XPS 13 9310 |
| helium | home router | OpenWrt | Cudy X6 v1 |
| rubidium | home server | NixOS | Raspberry Pi 4B |
| niobium | phone | GrapheneOS | Google Pixel 6a |
| barium | tablet | LineageOS | Samsung Galaxy Tab S6 Lite (Wi-Fi) |
| osmium | VPS | NixOS | Hetzner |
| zinc | e-book reader | Linux | Tolino Shine Color (Kobo Clara Colour) |
More Names
- Hydrogen (has .1)
- Thallium
- Nitrogen
To Do
- use Evolution from nixpkgs instead of Flatpak (doesn't work because after adding an EWS account, it won't show up; https://github.com/NixOS/nixpkgs/issues/190887)
How Tos
Set up LUKS with remote keyfile
# Generate keyfile
$ openssl rand -base64 4096 > luks-keyfile
# Store the keyfile's content securely
$ cat luks-keyfile | secret-tool store --label="My LUKS Keyfile" server-name keyfile
# Create the LUKS volume
$ secret-tool lookup server-name keyfile | base64 -d | ssh <host> sudo cryptsetup luksFormat <device> -
To unlock:
# rubidium
$ just luks-open rubidium
Create new calendar in Stalwart
from: https://github.com/stalwartlabs/stalwart/discussions/1670#discussioncomment-13634310
user=...
password=...
host="https://..."
create_calendar() {
local login="$1"
local id="$2"
local name="$3"
local color="$4" # e.g. '#f00'
local order="$5" # zero-based index
curl -u "$user:$password" \
-X MKCOL "$host/dav/cal/$login/$id/" \
-H "Depth: 0" \
-H "Content-Type: application/xml" --data-binary @- <<EOF
<?xml version="1.0" encoding="utf-8"?>
<D:mkcol xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
<D:set>
<D:prop>
<D:resourcetype>
<D:collection/>
<C:calendar/>
</D:resourcetype>
<D:displayname>$name</D:displayname>
<calendar-color xmlns="http://apple.com/ns/ical/">$color</calendar-color>
<calendar-order xmlns="http://apple.com/ns/ical/">$order</calendar-order>
</D:prop>
</D:set>
</D:mkcol>
EOF
}
create_calendar fyrk default Default "#26a269" 0
create_calendar fyrk hpi HPI "#007a9e" 10
create_calendar fyrk hpi_timetable "HPI Timetable" "#7664a0" 20
create_calendar fyrk hpi_exams "HPI Exams" "#b1063a" 30
create_calendar fyrk birthdays "Birthdays" "#f5c211" 40
create_calendar fyrk special_days "Special Days" "#1e1e1e" 50
create_calendar fyrk feiertage_brandenburg "Feiertage Brandenburg" "#000000" 60
create_calendar fyrk private "Private" "#8ff0a4" 70