NixOS and Home Manager flake for my system and user environment.
Overview - Layout - Usage - Secrets - Customization - Tooling
This repository contains my NixOS and Home Manager setup. It uses flake-parts, flake-file, and import-tree to expose NixOS modules, Home Manager modules, overlays, packages, Disko layouts, and development tooling from modules/.
- Public flake outputs are generated from
modules/throughinputs.import-tree ./modules. - NixOS modules live under
modules/nix,modules/services,modules/profiles, and top-level module files such asmodules/users.nix. - Home Manager modules live under
modules/programs,modules/desktop, and shared profile modules. - Desktop modules cover
Hyprland,UWSM,tuigreet,Noctalia Shell,Stylix, XDG portals, MIME defaults, and TUI/GUI integration. - Local packages, preview helpers, adapters, and overlays live under
modules/pkgs. Shared helpers live underlib/.
| Path | Purpose |
|---|---|
assets/ |
README images, user avatar, and shared static assets |
lib/ |
Small helper libraries for environment, MIME, Hyprland, Stylix, Starship, and Yazi config |
modules/desktop/ |
Hyprland, Noctalia, UWSM, greetd, XDG, clipboard, tablet, and desktop integration modules |
modules/development/ |
Dev shell and treefmt configuration |
modules/nix/ |
Core flake, Nix, Home Manager, SOPS, kernel, firmware, and input wiring |
modules/pkgs/ |
Local packages and package overlays |
modules/profiles/ |
Shared system and Home Manager profiles, partitioning, locale, theming, and tuning |
modules/programs/ |
CLI, TUI, GUI, Git, GPG, SSH, GTK, Java, and Nix-LD modules |
modules/services/ |
NixOS service modules for audio, networking, power, storage, containers, and system tuning |
vars.nix |
Shared identity, Git metadata, locale, and regional defaults |
From the repository root:
# Enter the development shell
nix develop
# Format and lint the repository
nix fmt
# Regenerate flake.nix after changing flake-file inputs
nix run .#write-flake- Runtime secrets live in a local
secrets.ymlat the project root (gitignored). - Recipient rules live in
.sops.yamlfor one user PGP key and three host Age keys. - SOPS Nix is shared between NixOS and Home Manager through
modules/nix/sops.nix.
Edit flow:
sops secrets.yml- Edit shared identity, locale, and Git metadata in
vars.nix. - Add NixOS behavior through
modules/nix,modules/services, andmodules/profiles. - Add user-facing tools through
modules/programsandmodules/desktop. - Add local packages and overlays under
modules/pkgs.
treefmt-nixwiresalejandra,deadnix,statix,nixf-diagnose,keep-sorted,shellcheck,shfmt,stylua,rumdl-format, andyamllint.flake-fileowns the generated rootflake.nix; update inputs in modules and regenerate withnix run .#write-flake.import-treeauto-discovers the module tree so most new modules only need to export the relevant flake attributes.- The default dev shell currently provides
sopsandtokei.