My personal NixOS flake, building dotfiles for all of my systems and servers.
The configuration is modular, with modules imported to each host as needed.
Shell scripts are built from the flake at https://github.com/joinemm/bin
rome
- Desktop workstation/gaming pcathens
- Thinkpad X1 Carbon gen11 (work laptop)byzantium
- Hetzner box running grafana and prometheus for monitoringalexandria
- Hetzner box acting as syncthing node and hosting web serviceskyoto
- Raspberry Pi 4B, mainly used as a DNS serverthebes
- Aoostar WTR PRO, my NAS and home server
Assuming NixOS is already running, a config can be switched to:
nixos-rebuild switch --flake .#$HOST
The included script will install the system, and add ssh_host_ed25519_key
specified in secrets.yaml
./scripts/install .#$HOST $REMOTE_IP --secrets hosts/$HOST/secrets.yaml
To update the remote server after changes, run nixos-rebuild
with remote target:
nixos-rebuild switch --flake .#$HOST --target-host $REMOTE_IP --use-remote-sudo
Add --fast
if the target system architecture does not match yours (e.g. it's aarch64
system)
The raspberry pi config can be built as flashable sd card image for initial installation:
nix build .#nixosConfigurations.kyoto.config.system.build.sdImage
# check sd card device
lsblk
# flash to sd card
cd result/sd-image
sudo dd if=nixos-sd-image-xxx-aarch64-linux.img of=/dev/xxx bs=4M conv=fsync status=progress
This sd card can now be inserted into a raspberry pi and it will boot the configuration.
This flake can also build the firmware for my custom Kyria split keyboard, with the keymaps located at ./keyboards/kyria/config
nix build .#firmware
The resulting .u2f
firmware files for left and right half are located inside result
.
The keymap svg can be drawn with nix run .#draw-keymap
and will create a new file in the current directory.