My NixOS Configs ❄️
Find a file
2026-03-09 22:16:37 -04:00
src updated bash submodule 2026-03-09 22:16:37 -04:00
.envrc added development environment 2024-05-13 10:44:55 -04:00
.gitignore Updated README to explicitly list out dir structure, directory hierarchy is how we keep the configs organized 2026-03-09 14:45:41 -04:00
.gitmodules changes 2026-03-09 20:19:53 -04:00
flake.lock Updated nix to 25.11 2026-03-08 14:11:02 -04:00
flake.nix nvim as a submodule 2026-03-09 02:01:54 -04:00
justfile changes 2026-03-09 20:19:53 -04:00
LICENSE unlicense 2023-03-22 10:30:50 -04:00
README.md changes 2026-03-09 20:19:53 -04:00
system.configs added system configs symlink 2024-11-05 21:05:31 -05:00
user.configs changed imports to mkModules 2024-11-08 01:37:20 -05:00

My Nix Configurations 💻

My modular Nix configs 🔥

Requirements ⚙️

Flake Endpoints ❄️

NixOS Configurations: desktop · workstation · server (wip) · vm · wsl

Fresh Install 🚀

From the NixOS live installer:

# Enable flakes (not enabled by default on installer)
echo "experimental-features = nix-command flakes" | sudo tee -a /etc/nix/nix.conf

# Clone repo
nix run nixpkgs#git -- clone --recurse-submodules https://github.com/itme-brain/nixos.git
cd nixos

# Enter dev shell and install
nix develop
just install desktop

Replace desktop with workstation or vm as needed.

Getting Started 🔧

git clone --recurse-submodules git@github.com:itme-brain/nixos.git

Enter the dev shell with nix develop, then run just to see available project scripts.

Useful resources:

⚠️ Be sure to tailor any hardware settings to your own — replace the hardware.nix in src/system/machines/<machine> with output from nixos-generate-config

Submodules 🔗

Standalone portable configurations maintained as separate repos. Each can be cloned independently on any system — NixOS or not.

Submodule Purpose Repo Standalone Install
nvim Full IDE (LSP, treesitter, telescope) itme-brain/nvim git clone git@github.com:itme-brain/nvim.git ~/.config/nvim
vim Lightweight editor for headless servers itme-brain/vim git clone git@github.com:itme-brain/vim.git ~/.vim
# Update a submodule
cd <submodule-path>
git add . && git commit -m "your changes" && git push
cd /path/to/nixos
git add <submodule-path> && git commit -m "Update <name> submodule"

# Pull submodule updates from remote
git submodule update --remote
git add <submodule-path> && git commit -m "Update <name> submodule"

Directory Structure 🗂️

.
├── flake.nix                          # Flake entrypoint - defines all NixOS configurations
├── flake.lock
├── justfile                           # Project scripts (via `just`)
├── system.configs -> src/system/machines/   # Symlink for quick access
├── user.configs -> src/user/config/         # Symlink for quick access
└── src/
    ├── system/                        # System-level (NixOS) configuration
    │   ├── machines/                  # Per-machine NixOS configurations
    │   │   ├── desktop/               # Desktop config (flake: nixosConfigurations.desktop)
    │   │   │   ├── default.nix        #   Machine entry point
    │   │   │   ├── hardware.nix       #   Machine-specific hardware config
    │   │   │   ├── system.nix         #   System-level settings
    │   │   │   └── modules/
    │   │   │       ├── disko/         #   Disk partitioning (disko)
    │   │   │       └── home-manager/  #   Home-manager integration + home.nix
    │   │   ├── workstation/           # Workstation config (same structure as desktop)
    │   │   ├── server/                # Server config (no disko)
    │   │   ├── vm/                    # VM config
    │   │   ├── wsl/                   # WSL config (includes wsl module)
    │   │   └── laptop/                # Laptop config (stub)
    │   └── modules/                   # Shared system modules (imported by machines)
    │       ├── default.nix
    │       ├── bitcoin/               # Bitcoin node + electrum server
    │       ├── forgejo/               # Self-hosted Forgejo
    │       └── nginx/                 # Nginx reverse proxy
    │
    └── user/                          # User-level (home-manager) configuration
        ├── default.nix                # User module entry point
        ├── config/                    # User identity & settings
        │   ├── default.nix            #   Common user variables (username, email, etc.)
        │   ├── bookmarks/             #   Browser bookmarks
        │   ├── keys/                  #   Public keys
        │   │   ├── pgp/               #     PGP public keys
        │   │   └── ssh/               #     SSH public keys
        │   ├── nvim                   #   Symlink to neovim submodule config
        │   └── vim                    #   Symlink to vim submodule config
        └── modules/                   # Home-manager modules
            ├── bash/                  # Shell config (aliases, prompt, bashrc)
            ├── git/                   # Git config + helper scripts
            ├── tmux/                  # Tmux config
            ├── security/              # Security tools (GPG)
            ├── utils/                 # CLI utilities
            │   └── modules/
            │       ├── dev/           #   Dev tools (penpot, PCB design)
            │       ├── email/         #   Email client (aerc)
            │       ├── irc/           #   IRC client
            │       ├── neovim/        #   Neovim (config is a git submodule)
            │       └── vim/           #   Vim lightweight (config is a git submodule)
            └── gui/                   # GUI applications
                ├── modules/
                │   ├── alacritty/     #   Terminal emulator
                │   ├── browsers/      #   Firefox & Chromium
                │   ├── corn/          #   Corn app
                │   ├── fun/           #   Discord, etc.
                │   ├── utils/         #   GUI utilities
                │   └── writing/       #   Writing tools
                └── wm/                # Window managers
                    ├── hyprland/      #   Hyprland (Wayland) + waybar, rofi
                    ├── sway/          #   Sway (Wayland) + rofi
                    ├── i3/            #   i3 (X11) + rofi
                    └── shared/        #   Shared WM config (mimeapps)

How it works

flake.nix defines NixOS configurations (desktop, workstation, server, wsl) that each reference a machine under src/system/machines/. Each machine's default.nix pulls in its own hardware.nix, system.nix, and per-machine modules (disko, home-manager).

The system layer (src/system/) handles NixOS-level concerns: hardware, bootloader, networking, and system services. Shared modules in src/system/modules/ can be imported by any machine.

The user layer (src/user/) handles home-manager configuration. src/user/config/ defines user identity (name, email, keys), while src/user/modules/ contains modular home-manager configs for individual tools. Each machine's home-manager/home.nix selects which user modules to enable.

Root symlinks system.configs and user.configs provide quick access to machine definitions and user config from the repo root.