This is a modular NixOS configuration using Nix flakes and home-manager in standalone mode. It manages both system-level (NixOS) and user-level (home-manager) configurations for a reproducible, declarative Linux environment.
- Flake-based: Leverages Nix flakes for reproducible builds and dependency management.
- Modular Structure: Organized into
modules/(system modules),apps/(user applications), andpackages/(system packages) for easy maintenance. - Custom Inputs: Includes bleeding-edge software like niri (Wayland compositor), zen-browser, and theming with catppuccin.
- Standalone Home-Manager: User configs are managed separately from NixOS for flexibility.
- Theming: Consistent catppuccin theme across system and applications.
flake.nix: Main flake definition with inputs and outputs.hosts/: Per-host configurations (e.g.,hosts/sol/configuration.nix).users/: Per-user Home Manager configurations (e.g.,users/bye/home.nix).modules/: System-level modules (e.g., fonts, printing, virtualization, niri WM).apps/: User applications and tools (e.g., GUIs, CLIs, web apps).packages/: System modules for packages (e.g., gaming, syncthing, kanata).flake.lock: Locked flake dependencies.
- Prerequisites: Ensure Nix is installed with flakes enabled (
nix.settings.experimental-features = ["nix-command" "flakes"]). - Clone and Build:
git clone <this-repo> cd nixconfig sudo nixos-rebuild switch --flake .#sol # For system config home-manager switch --flake .#bye # For user config
- Update: Run
nix flake updateto refresh inputs, then rebuild. - Secrets: Sensitive data (e.g., passwords) should use agenix or sops-nix instead of hardcoding.
- Rebuild System:
sudo nixos-rebuild switch --flake .#sol - Rebuild User:
home-manager switch --flake .#bye - Check Flake:
nix flake check(add this for validation). - Modules: Enable/disable in
modules/default.nix,apps/default.nix, etc.
- Add new modules in
modules/and import inmodules/default.nix. - For packages, add to
packages/subdirs and import inpackages/default.nix. - Use overlays in
flake.nixfor custom package modifications. - To add a user: Create
vars/newuser.nixwith overrides and import inflake.nix.
- If rebuild fails, check
nix.logor runjournalctl -u nix-daemon. - For home-manager issues, ensure standalone mode is set.