A complete system configuration for my systems for use with the Nix package manager
Report Bug
·
Request Feature
demo_video.mp4
Table of Contents
This is my Nix config to fully define any system I want to build — NixOS on Linux and nix-darwin on macOS. It include configuration for installing anything on a fully-featured system of mine, and the Home Manager configs for editing the configuration of installed software.
The usage of Home Manager in this project is to the point that some would call it dogmatic, but it makes all config reproducible between systems.
The configuration is organized around three structured declarations — flake.programs, flake.hosts, flake.users — from which all wiring is generated, and every user's home is a standalone home-manager configuration. Underneath, the Dendritic Pattern on top of flake-parts auto-imports every .nix file under modules/ as a feature via import-tree. flake.nix is auto-generated by flake-file — declare inputs in a feature's flake-file.inputs and run nix run .#write-flake.
Full documentation lives in docs/ — tutorials, how-to guides, reference, and explanation: the source of truth for understanding the repo. .agents/skills/nix-config/ is the operational guide for changing it.
- You should avoid all package managers except the Nix Package Manager
- Any program configuration that is possible through home manager should be done through home manager
- Prefer configuration implementations that fully utilize flakes
This flake runs on NixOS (Linux) and nix-darwin (macOS). The complete recipe — including the one-time config-group ACL sequence and sops key placement — is docs/how-to/bootstrap-machine.md; for a guided lesson from bare OS to first rebuild, see docs/tutorials/new-machine-walkthrough.md.
Start with an installed NixOS or macOS system, internet access, and an administrator account.
A NixOS bootstrap also requires one authorized age private key from another machine or secure backup.
Follow the complete bootstrap guide for a declared host.
Follow the new-machine walkthrough when the host is not declared yet.
Both procedures use Nix-provided tools. A fresh machine does not need Git or an editor installed first.
The NixOS hosts use the Niri window manager. These common shortcuts are configured:
- Mod + Space: Open the application launcher.
- Mod + q: Open a terminal.
- Mod + c: Close the focused window.
Fish provides these rebuild helpers:
- nrr: Run
nr "Regular update". - nr "message": Verify every environment, commit and push the change, rebuild the system, and reactivate the invoking user's home.
- nr: Amend the last commit with the next generation number, then push and rebuild.
- hr: Rebuild and activate only the invoking user's standalone Home Manager configuration.
See the nr reference for flags, staging behavior, and commit mechanics. See Rebuild your home for hr.
More autoloaded helpers live in modules/programs/fish/functions/. They include the mc-* Minecraft controls, np* package inspectors, nc, and suu.
TODO.md is the only work tracker for this repository. It contains every open task and removes completed work.
If you seriously want to spend your time contributing to someone else's system configuration, I'm not going to stop you. All contributions are welcome if they adhere to the principles of the project.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement"
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt for more information.
Jake Neau - jakeneau@proton.me
Project Link: https://github.com/JakeNeau/Jake-Neau-NixOS-Config