NixOS

This repo builds two NixOS hosts from one flake and a shared baseline.

HostMachine directoryNotes
nix-haxorusconf/machines/thinkpad/ThinkPad workstation with Hyprland.
nix-baxcaliburconf/machines/hp/HP host for shared services.

Repository Layout

PathPurpose
flake.nixHost outputs, inputs, and Home Manager wiring.
flake.lockExact upstream revisions.
conf/shared.nixShared NixOS and Home Manager modules.
conf/machines/*/configuration.nixHost-specific system choices.
conf/machines/*/hardware-configuration.nixGenerated hardware facts.
conf/modules/App config assets and focused local modules.
conf/services/Reusable service modules.
conf/secrets/owais.yamlSOPS-encrypted secrets.

For the concepts behind flakes and modules, see Nix Concepts.

Rebuilds

Use the hostname as the flake target:

sudo nixos-rebuild test --flake .#$(hostname)
sudo nixos-rebuild switch --flake .#$(hostname)

Prefer test before switch when touching boot, display managers, shells, networking, secrets, or Home Manager activation.

Inputs

Keep flake.lock stable unless the task is intentionally updating packages or modules. For targeted updates:

nix flake lock --update-input nixpkgs-unstable

For a broad refresh:

nix flake update

Evaluate at least one host after lock changes.

Secrets

SOPS-Nix decrypts configured secrets to /run/secrets/ on NixOS hosts. See Secrets for the active secret names and local edit commands.

Services

Shared service policy and host-specific service pages live under Services.

Adding Hosts

Use Adding a New Machine for the operational checklist.