Flake for my desktop, laptop, and my homelab.
README.md
Avatar Nix logo

adam0's infra #

NixOS and Home Manager configuration for my desktop, laptop and homelab server.

Repo Size
NixOS Flakes Home Manager Stylix SOPS Nix Disko

Machines - Configuration - Layout - Making changes

This repo contains the NixOS and Home Manager configuration for my desktop, laptop and euclid server.

If you want to use parts of it, check the hardware settings, disk layouts and secrets first. Those are configured for these machines, so they will need changes before using them on another system.

Machines #

Host Purpose Configuration
desktop Desktop Desktop configuration
laptop Laptop Laptop configuration
euclid Homelab server Server configuration

Configuration #

The desktop and laptop use Hyprland with UWSM, Noctalia Shell and tuigreet. Stylix handles theming, and the application configuration includes Zen Browser, Neovim, Fish and the other programs in modules/programs/.

The server configuration includes Traefik, Authentik, WireGuard and CrowdSec, with databases, notifications and container services. The server's service imports are in modules/hosts/euclid/default.nix.

Disko defines the disk layouts in modules/profiles/partitioning/. Secrets are stored in secrets.yaml and loaded through SOPS Nix. The system expects an existing Age key at /var/lib/sops-nix/key.txt; it does not generate one.

Layout #

Path What is there
modules/hosts/ Host configuration and hardware settings
modules/profiles/ Base, personal, server and gaming profiles, partitioning and theming
modules/desktop/ Hyprland, Noctalia, login and desktop settings
modules/programs/ Application and shell configuration
modules/services/ Networking, security, storage and server services
modules/nix/ Nix, Home Manager, secrets, boot and input configuration
modules/development/ Development shell and formatter configuration
modules/pkgs/ Local packages, overlays and helper scripts
lib/ Helper functions used by the modules
vars.nix Shared user, locale and domain settings
assets/ README images

Making changes #

For a machine-specific change, start in modules/hosts/. The desktop and laptop import the personal and gaming profiles; euclid imports server. The profiles select the application and service modules for each setup.

The flake uses flake-parts and import-tree to load the files under modules/. Defining a named NixOS or Home Manager module does not enable it; it still needs to be imported by a host or profile.

flake.nix is generated by flake-file. Input declarations are kept in the module files, including modules/nix/dendritic.nix, so make input changes there and regenerate the flake rather than editing the generated file.