Skip to content

Commit 1438af2

Browse files
committed
docs(README): update configuration details and migrate from Home Manager to nix-wrappers
Enhanced the README to reflect the migration of user program configurations from Home Manager to nix-wrappers. Updated module structure and added new wrapper configurations for Git, Ghostty, Fuzzel, and Neovim. Clarified system tuning and desktop configurations, and included migration notes for users transitioning from the old setup.
1 parent 72cfce2 commit 1438af2

File tree

1 file changed

+86
-42
lines changed

1 file changed

+86
-42
lines changed

README.md

Lines changed: 86 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# NixOS Configuration
22

3-
A modular, reproducible NixOS configuration optimized for development and professional audio work. Built with flakes, Home Manager, and modern tooling.
3+
A modular, reproducible NixOS configuration optimized for development and professional audio work. Built with flakes, nix-wrappers, and modern tooling.
44

55
## Features
66

77
- **Flake-based** - Reproducible, atomic updates with flake inputs
88
- **Modular architecture** - Shared modules under `modules/common/` for easy reuse
9+
- **Wrapper-based user programs** - User applications configured via nix-wrappers (migrated from Home Manager)
910
- **Professional audio** - Low-latency PipeWire configuration with realtime scheduling
1011
- **System tuning** - Optimized for AMD Ryzen 7 5800X and RX 6700 XT
1112
- **Code quality** - treefmt with 10+ formatters, git-hooks.nix pre-commit hooks, CI checks
@@ -62,34 +63,25 @@ nixos/
6263
│ ├── ikigai.nix # Main host (ikigai)
6364
│ └── test-vm.nix # VM variant
6465
65-
├── modules/common/ # Shared modules
66-
│ ├── desktop/ # Sway, theming, audio
67-
│ ├── hardware/ # GPU configuration
68-
│ ├── i18n/ # Locale, keyboard, timezone
69-
│ ├── network/ # DNS, firewall, IPv6
70-
│ ├── nix/ # Nix settings, registry, substituters
71-
│ ├── packages/ # System packages, git config
72-
│ ├── security/ # 1Password, SOPS, PAM
73-
│ ├── services/ # Docker, Cachix, systemd services
74-
│ └── tuning/ # Kernel, sysctl, I/O, power, audio
75-
76-
├── home/ # Home Manager configuration
77-
│ └── kaizen/ # User-specific configuration
66+
├── modules/
67+
│ ├── common/ # Shared system modules
68+
│ │ ├── desktop/ # Sway, theming, audio, XDG, greetd
69+
│ │ ├── hardware/ # GPU configuration
70+
│ │ ├── i18n/ # Locale, keyboard, timezone
71+
│ │ ├── network/ # DNS, firewall, IPv6
72+
│ │ ├── nix/ # Nix settings, registry, substituters
73+
│ │ ├── packages/ # System packages, SSH config
74+
│ │ ├── security/ # 1Password, SOPS, PAM
75+
│ │ ├── services/ # Docker, Cachix, systemd services
76+
│ │ ├── system/ # System environment variables
77+
│ │ └── tuning/ # Kernel, sysctl, I/O, power, audio
78+
│ │
79+
│ └── wrappers/ # User program wrappers (nix-wrappers)
7880
│ ├── default.nix # Main entry point
79-
│ ├── packages.nix # Packages without HM modules
80-
│ ├── programs/ # Program configurations
81-
│ │ ├── cli/ # CLI tools (htop, btop, eza, etc.)
82-
│ │ ├── editors/ # VS Code, Neovim
83-
│ │ ├── terminal/ # Ghostty
84-
│ │ ├── wayland/ # Sway, Waybar
85-
│ │ └── git.nix # Git configuration
86-
│ ├── services/ # User services
87-
│ └── system/ # System-level configs
88-
│ ├── audio.nix # ALSA user config
89-
│ ├── env.nix # Environment variables
90-
│ ├── fonts.nix # Font configuration
91-
│ ├── shell.nix # Zsh configuration
92-
│ └── xdg.nix # XDG base directories
81+
│ ├── git.nix # Git wrapper with config
82+
│ ├── ghostty.nix # Ghostty terminal wrapper
83+
│ ├── fuzzel.nix # Fuzzel launcher wrapper
84+
│ └── neovim.nix # Neovim wrapper
9385
9486
├── users/ # User definitions
9587
├── lib/ # Helper functions
@@ -132,7 +124,6 @@ pre-commit run --all-files # Run all hooks manually
132124

133125
```bash
134126
just build # Build NixOS configuration
135-
just build-home # Build Home Manager config
136127
just eval-config # Evaluate config (no build)
137128
just syntax-check <file> # Check Nix syntax
138129
```
@@ -186,6 +177,17 @@ nix run .#treefmt
186177

187178
## Configuration Modules
188179

180+
### Wrappers (`modules/wrappers/`)
181+
182+
User programs are configured via **nix-wrappers** (migrated from Home Manager):
183+
184+
- **Git** (`git.nix`): Git wrapper with global configuration, aliases, SSH signing
185+
- **Ghostty** (`ghostty.nix`): Terminal emulator with theme and font configuration
186+
- **Fuzzel** (`fuzzel.nix`): Application launcher with styling
187+
- **Neovim** (`neovim.nix`): Editor wrapper (minimal, config can be extended)
188+
189+
Wrappers automatically add programs to `environment.systemPackages` when `systemWide = true` is set.
190+
189191
### System Tuning (`modules/common/tuning/`)
190192

191193
Hardware-optimized configuration for AMD Ryzen 7 5800X and RX 6700 XT:
@@ -198,9 +200,11 @@ Hardware-optimized configuration for AMD Ryzen 7 5800X and RX 6700 XT:
198200

199201
### Desktop (`modules/common/desktop/`)
200202

201-
- **Sway** (`sway.nix`): Window manager configuration
202-
- **Theming** (`theming.nix`): Tokyo Night theme via base16.nix
203+
- **Sway** (`sway.nix`): Window manager configuration (config written to `/etc/sway/config`)
204+
- **Theming** (`theming.nix`): Tokyo Night theme via base16.nix, GTK/Qt theming
203205
- **Audio** (`audio.nix`): PipeWire, WirePlumber, realtime scheduling
206+
- **XDG** (`xdg.nix`): XDG portal configuration, desktop/session environment variables
207+
- **Greetd** (`greetd.nix`): Display manager configuration
204208

205209
### Security (`modules/common/security/`)
206210

@@ -219,24 +223,19 @@ Hardware-optimized configuration for AMD Ryzen 7 5800X and RX 6700 XT:
219223
- **Substituters** (`substituters.nix`): Binary cache configuration
220224
- **Settings** (`default.nix`): Nix experimental features, performance settings
221225

222-
### Home Manager (`home/kaizen/`)
223-
224-
- **Programs** (`programs/`): All program configurations organized by category
225-
- **System** (`system/`): XDG, environment variables, fonts, shell, audio
226-
- **Services** (`services/`): User services (systemd user units)
227-
- **Packages** (`packages.nix`): Packages without Home Manager modules
228-
229226
## Flake Inputs
230227

231228
- `nixpkgs` - Stable (nixos-25.11)
232229
- `nixpkgs-unstable` - For newer packages
233-
- `home-manager` - User configuration
230+
- `wrappers` - nix-wrappers library for user program configuration
234231
- `sops-nix` - Secret management
235232
- `base16` - Theming support
236233
- `treefmt-nix` - Code formatting
237234
- `git-hooks` - Pre-commit hooks
238235
- `nix-topology` - Infrastructure visualization
239236

237+
**Note**: Home Manager has been deprecated and migrated to nix-wrappers for user program configuration.
238+
240239
## Hardware
241240

242241
Optimized for:
@@ -296,13 +295,47 @@ networking.firewall.enable = false;
296295
environment.systemPackages = with pkgs; [
297296
# Add packages here
298297
];
298+
299+
# Zsh configuration
300+
programs.zsh = {
301+
enable = true;
302+
# ... configuration
303+
};
299304
```
300305

301306
### Add Packages
302307

303308
- **System packages**: Edit `modules/common/packages/default.nix`
304-
- **User packages**: Edit `home/kaizen/packages.nix`
305-
- **Programs with HM modules**: Add to `home/kaizen/programs/`
309+
- **User programs via wrappers**: Add to `modules/wrappers/` (e.g., `modules/wrappers/myapp.nix`)
310+
311+
### Add a Wrapper
312+
313+
Create a new wrapper file in `modules/wrappers/`:
314+
315+
```nix
316+
# modules/wrappers/myapp.nix
317+
{
318+
pkgs,
319+
...
320+
}:
321+
{
322+
wrappers.myapp = {
323+
basePackage = pkgs.myapp;
324+
systemWide = true; # Automatically add to systemPackages
325+
executables.myapp = {
326+
environment = {
327+
MYAPP_CONFIG = {
328+
value = pkgs.writeText "myapp.conf" ''
329+
# Configuration here
330+
'';
331+
};
332+
};
333+
};
334+
};
335+
}
336+
```
337+
338+
Then import it in `modules/wrappers/default.nix`.
306339

307340
### Modify Tuning
308341

@@ -339,11 +372,22 @@ sudo nixos-rebuild switch
339372
sudo modprobe -r <module> # Manually unload
340373
```
341374

375+
## Migration Notes
376+
377+
This configuration migrated from Home Manager to nix-wrappers. The old Home Manager configuration is preserved in `home.old/` for reference.
378+
379+
Key differences:
380+
381+
- User programs are now configured via wrappers in `modules/wrappers/`
382+
- System-wide configuration remains in `modules/common/`
383+
- Zsh configuration is now in host files (`hosts/ikigai.nix`) via `programs.zsh`
384+
- Git configuration is in `modules/wrappers/git.nix` as a wrapper
385+
342386
## References
343387

344388
- [NixOS Manual](https://nixos.org/manual/nixos/stable/)
345389
- [NixOS Wiki](https://wiki.nixos.org/)
346-
- [Home Manager](https://nix-community.github.io/home-manager/)
390+
- [nix-wrappers](https://codeberg.org/midischwarz12/nix-wrappers)
347391
- [treefmt](https://treefmt.com/)
348392
- [SOPS-nix](https://github.com/Mic92/sops-nix)
349393
- [nh](https://github.com/nix-community/nh)

0 commit comments

Comments
 (0)