My personal NixOS configurations
nix
Find a file
2026-05-02 00:05:51 +02:00
homeConfigurations deadnix fixes 2026-05-01 23:38:08 +02:00
homeModules move git to own mod 2026-05-01 23:43:24 +02:00
nixosConfigurations pc2: fix cannot build aarch64 2026-05-01 23:50:28 +02:00
nixosModules distributed builds: use builders as binary caches 2026-05-02 00:05:51 +02:00
.gitignore a big mess of specific service config 2024-02-23 22:31:46 +01:00
devices.nix distributed builds: use builders as binary caches 2026-05-02 00:05:51 +02:00
flake.lock nix flake update nova-shell 2026-05-01 21:24:32 +02:00
flake.nix deadnix fixes 2026-05-01 23:38:08 +02:00
LICENSE Create LICENSE 2023-04-04 22:19:39 +02:00
nixosConfigurations.nix move git to own mod 2026-05-01 23:43:24 +02:00
README.md distributed builds: use builders as binary caches 2026-05-02 00:05:51 +02:00

nixos-configuration

Personal NixOS configuration for all machines. Devices are declared in devices.nix, per-device configs live in nixosConfigurations/<name>/, and shared modules in nixosModules/.

Distributed builds

Machines are configured to act as build servers / binary caches for each other in devices.nix.

Onboarding a device as a build client

  1. Generate a key pair on the device:
    sudo ssh-keygen -t ed25519 -f /etc/nix/distributed-build-key -N "" -C "$(hostname)-nix-builds"
    
  2. Add the public key to the device entry in devices.nix:
    distributedBuilds.clientPublicKey = "ssh-ed25519 AAAA... <hostname>-nix-builds";
    
  3. Rebuild all build machines so they pick up the new authorized key.

Adding a build server

  1. Add to its entry in devices.nix:
    distributedBuilds.isBuilder = true;
    distributedBuilds.hostPublicKey = "ssh-ed25519 AAAA..."; # from: ssh-keyscan -t ed25519 <hostname>
    
  2. Generate a store signing key on the builder:
    sudo nix key generate-secret --key-name "$(hostname)" | sudo tee /etc/nix/signing-key.sec | sudo nix key convert-secret-to-public
    
  3. Add the printed public key to devices.nix:
    distributedBuilds.storeSigningPublicKey = "<hostname>:<base64...>";
    
  4. Rebuild all machines so they trust the new signing key.