Another blazingly mid nix configuration with an overengineered dendritic architecture built on flakes and home manager with automatic module discovery, sane defaults, powered by Hyprland (or Mango), and held together by hopes, dreams and vibes.
Important
This is a personal configuration, shared for reference and inspiration NOT adoption.
- This configuration is constantly evolving. It is prone to drastic and likely breaking changes.
- Features may be partially implemented or entirely broken.
- The README and documentation will often times be outdated.
- I provide no guarantees of stability or support.
If you intend to use any aspect of my configuration, make sure you:
- Review the code thoroughly.
- Understand what each module does.
- Adapt it to your specific use case.
flake.nix&flake.lock— Define the entry points and locks dependencies.hosts/— Contains host specific configuration.modules/— Contains nix and home manager modules.scripts/— Contains variousbashscripts.wallpapers/— Collection of wallpapers for your viewing pleasure.
modules/commons— Universal Configurationsmodules/core— Device & Hardware Configurationsmodules/extra— Software Configurationsmodules/lib— Helper Scriptsmodules/session— Window Managers & Shell
Modules follow a concern / context first structure. For example, the git.nix file contains the installation of git, home manager configurations for it, git shell aliases and related applications like lazygit and delta.
Every .nix file under modules/ is automatically discovered and imported by modules/lib/recursive.nix, preventing the need for manual imports. The importer skips private files prefixed with _ or ., and the /lib/ directory itself. Most modules follow a on by default format. To disable a feature or module on a given host, module.<name>.enable = false; can be set.
Hosts are formed by combining the auto discovered modules with host specific overrides in host/default.nix. Where the host file serves as a dendritic dashboard for enabling hardware support, selecting a window manager and documenting which modules are explicitly enabled or disabled.
The code quality and formatting is enforced via treefmt-nix, utilising three tools.
nixfmt— The standard Nix formatter, ensuring consistent whitespace, line breaks and attribute ordering.deadnix— Scans for unusedletbindings, unreferenced function arguments and deadwithstatements.statix— Analyses expressions for anti-patterns e.g. unusedargs, unnecessarywithstatements and deprecated idioms.
The formatter module at modules/lib/formatter.nix is passed through treefmt-nix's evalModule, which outputs a combined wrapper binary. The wrapper runs all three tools in sequence.
Note
- The configuration expects the repository to live in
$HOME/.nixos - If your
usernameand / orrepoPathneed to be updated, they can be updated inmodules/globals.nix. - The
--recursiveflag ensures theyaksquickshell submodule is pulled.
-
Clone
nix-shell -p git git clone --recursive https://github.com/goon/nixos ~/.nixos cd ~/.nixos
-
Run the Bootstrap Script
./scripts/bootstrap
-
Clone:
nix-shell -p git git clone --recursive https://github.com/goon/nixos ~/.nixos cd ~/.nixos
-
Generate Hardware Configuration:
nixos-generate-config --show-hardware-config > hosts/desktop/hardware-configuration.nix -
Rebuild:
sudo nixos-rebuild switch --flake .#desktop -
Update:
sudo nix flake update
Thank you to the countless Nix OS configurations that I copied learnt from.
namishh — seniormatt — fufexan — frost-pheonix — anotherhadi — vic — vimjoyer — bad3r — mitchellh — misterio77 — max-baz — gvolpe — librephoenix — sioodmy
Due to my dementia I may have missed many. Regardless, I am thankful.
This repository is licensed under the MIT LICENSE.

