Modular multi-host NixOS and Home Manager flake for desktop, laptop, and virtual machine systems.
Overview - Hosts - Usage - Secrets - Customization - Tooling
This repository contains a personal NixOS setup built around flake-parts, Home Manager, and a heavily modular directory layout. It shares a common base across multiple machines, then layers host-specific hardware, service, and desktop overrides on top.
- Shared NixOS modules under
modules/system, Home Manager modules undermodules/home, and per-host overrides undermodules/hosts. - Three flake outputs:
desktop,laptop, andvm, all created from the same module stack inflake/nixos.nix. - Declarative storage with
Disko, encrypted secrets withSops-nix, Secure Boot withLanzaboote, and theming throughStylix. - Desktop built on
Hyprland,UWSM,greetd+tuigreet, andNoctalia Shell.
| Host | Purpose | Notable differences |
|---|---|---|
desktop |
Main workstation | ROCm enabled, dual-monitor Hyprland layout, Wooting and Roccat support, AMD + Intel GPU monitoring |
laptop |
Mobile system | Wi-Fi, Bluetooth, TLP, SCX, lid switch handling, battery-oriented tuning, touch support |
vm |
QEMU/KVM guest | /dev/vda Disko target, SSH enabled, guest agents, simplified display setup |
From the repository root:
# Inspect flake outputs
nix flake show
# Apply a host configuration
sudo nixos-rebuild switch --flake .#desktop
# Format the repository
nix fmt
# Enter the dev shell
nix developImportant
The host modules point at real installation devices such as /dev/nvme0n1 and /dev/vda, and the configuration expects an Age key at /var/lib/sops-nix/key.txt. Review modules/hosts/*/default.nix, modules/system/disk.nix, and modules/system/sops.nix before using this on a new machine.
- Secrets live in
secrets/secrets.yamland are managed with Sops-nix. - Recipient rules are defined in
.sops.yamlfor one user key and three host Age keys.
Edit flow:
sops secrets/secrets.yaml- Edit shared identity, locale, and Git metadata in
vars.nix. - Adjust host-specific hardware and service choices in
modules/hosts/<host>/. - Add or override shared behavior in
modules/system/andmodules/home/. - Extend package selection through
pkgs/andoverlays/.
- Formatting and linting are wired through
treefmtinflake/treefmt.nix. - The repository uses
import-treeextensively to auto-discover modules, overlays, and local packages.
- This repository is mixed-license. The root
LICENSEfile contains theAGPL-3.0-or-latertext intended for original work authored for this repository, unless a file says otherwise. - Files derived from Nixpkgs are kept under MIT-compatible treatment with upstream attribution preserved. See
pkgs/lutris.nix,pkgs/zaread.nix, andTHIRD_PARTY_NOTICES.md. - Adapter scripts adapted from
ripgrep-alldiscussion posts are marked as adapted third-party material with provenance notices. They are not being confidently relabeled asAGPL-3.0-or-laterwithout a clearer relicensing basis. - Other copied or vendored third-party material keeps its own attribution and should be reviewed under
THIRD_PARTY_NOTICES.mdrather than assumed to follow the repo default.