mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-23 16:29:42 -04:00
My NixOS Configs ❄️
Directory structure: - Move from src/ to root level (system/, user/) - Remove unused machines (workstation, vm, laptop) User configuration: - Add user/home.nix for shared defaults (pass, essentials, default modules) - Centralize user options in user/default.nix - Move submodules to consistent paths (bash/bash, git/git, neovim/nvim, vim/vim) Module reorganization: - Flatten nested module structures (remove /modules/ subdirs) - Split CLI vs GUI tools (dev/ for CLI, gui/dev/ for GUI) - Move neovim/vim to top-level modules (not under utils/) - Remove security.enable - pass now in user/home.nix - Remove utils.enable - essentials now in user/home.nix - Add security/yubikey module with yubikey-manager, age-plugin-yubikey - Move pcb, design to gui/dev/ - Replace penpot docker wrapper with nixpkgs penpot-desktop - Remove i3 config - Remove deprecated wsl.nativeSystemd option GUI improvements: - Browser-focused mimeApps in gui/default.nix - Each WM handles its own auto-start via profileExtra Cleanup: - Update README with new structure - Update justfile paths and valid systems - Fix submodule paths in .gitmodules |
||
|---|---|---|
| system | ||
| user | ||
| .envrc | ||
| .gitignore | ||
| .gitmodules | ||
| flake.lock | ||
| flake.nix | ||
| justfile | ||
| LICENSE | ||
| README.md | ||
NixOS Configuration
Modular NixOS flake configuration with home-manager integration.
Requirements
- Nix with Flakes
- NixOS for system configurations
- Home-Manager for user configurations
Flake Outputs
| Configuration | Description |
|---|---|
desktop |
Primary workstation |
server |
Home server |
wsl |
Windows Subsystem for Linux |
Fresh Install
From the NixOS live installer:
# Enable flakes
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
Getting Started
git clone --recurse-submodules git@github.com:itme-brain/nixos.git
cd nixos
nix develop
just
Note: Replace hardware.nix in system/machines/<machine> with output from nixos-generate-config for your hardware.
Directory Structure
.
├── flake.nix
├── flake.lock
├── justfile
│
├── system/
│ ├── keys/ # Machine SSH keys
│ │ └── desktop/
│ └── machines/
│ ├── desktop/
│ │ ├── default.nix # Machine entry point
│ │ ├── hardware.nix # Hardware config
│ │ ├── system.nix # System settings
│ │ └── modules/
│ │ ├── disko/ # Disk partitioning
│ │ └── home-manager/ # Home-manager integration
│ ├── server/ # Server (same structure)
│ └── wsl/ # WSL (same structure)
│
└── user/
├── default.nix # User options (name, email, keys)
├── home.nix # Shared home-manager defaults
├── bookmarks/
├── keys/
│ ├── age/
│ ├── pgp/
│ └── ssh/
└── modules/
├── bash/bash/ # Shell (submodule)
├── git/git/ # Git (submodule)
├── neovim/nvim/ # Neovim (submodule)
├── vim/vim/ # Vim (submodule)
├── tmux/
├── dev/ # CLI dev tools
├── security/
│ ├── gpg/
│ └── yubikey/
├── utils/
│ ├── dev/ # Dev tools (claude-code, direnv, etc.)
│ ├── email/
│ ├── irc/
│ └── writing/
└── gui/
├── default.nix # Browser-focused mimeApps
├── wm/
│ ├── hyprland/
│ └── sway/
├── browsers/
├── alacritty/
├── dev/
│ ├── pcb/ # Arduino, KiCad
│ └── design/ # Penpot
├── corn/
├── fun/
└── utils/
Architecture
flake.nix defines NixOS configurations that reference machines under system/machines/.
Each machine imports its hardware, system settings, and home-manager config.
user/home.nix provides shared defaults for all users:
- Essential packages
- Default modules
Machine home.nix imports user defaults and enables machine-specific modules.