3.2 KiB
3.2 KiB
bertof's NixOS Dotfiles
Personal NixOS configuration repository using flake-parts for modular system management across multiple hosts.
Architecture
Structure
flake.nix- Main flake definition with flake-parts modularizationinstances/- Host-specific configurations (thor, sif, odin, heimdall, baldur)hm/- Home Manager modules and user configurationsnixos/- NixOS system modules and shared configurationspkgs/- Custom packages and overlayssecrets/- Encrypted secrets managed with ragenix
Hosts
- thor - AMD desktop system (stable channel)
- sif - Intel desktop system (stable channel)
- odin - Intel laptop/server hybrid
- heimdall - AMD server with self-hosted services
- baldur - Intel server with monitoring services
Features
System Management
- flake-parts for modular flake structure
- Multi-channel support (stable/unstable nixpkgs)
- Hardware-specific configurations via nixos-hardware
- Secret management with ragenix encryption
Development & Quality
- Pre-commit hooks with nix-git-hooks:
deadnix- Remove dead codenixpkgs-fmt- Format Nix codestatix- Lint for best practicesflake-checker- Validate flake structuremdformat&markdownlint- Markdown formattingtypos- Spell checking
Home Manager Integration
- Modular user configurations in
hm/ - Development environments (cpp, go, javascript, kubernetes)
- Desktop applications (alacritty, neovim, browsers)
- Custom theming with nix-rice
Custom Packages
keyboard-switch- Keyboard layout switcherwl-clipedit- Wayland clipboard editorwl-lockscreen- Wayland lock screenwl-update-background- Background updater
Usage
Development Environment
nix develop
Build System
nix build .#nixosConfigurations.thor.config.system.build.toplevel
Deploy Configuration
sudo nixos-rebuild switch --flake .#thor
System Images
Generate deployment images:
nix build .#install-iso # Installer ISO
nix build .#raw-base-image # RAW image
nix build .#vmdk-base-image # VMware image
nix build .#aarch64-base-image # ARM64 image
Configuration Details
Channels
- Stable (
nixpkgs-s) - Production systems (thor, sif) - Unstable (
nixpkgs-u) - Development and latest packages
Modules
- basic - Core Nix configuration
- commonModules - Shared system modules
- mainModules - Desktop environment modules
- homeManagerModules - User-level configuration
Services by Host
- heimdall: Nextcloud, Immich, Forgejo, Garage, Ollama
- baldur: Vaultwarden, Uptime Kuma, Garage
- thor/sif: Steam, Ollama, Garage, Virtualization
- odin: IP forwarding, Garage, Steam
Requirements
- Nix with flakes enabled
- Git for version control
- ragenix for secret management
Workflow
- Make changes to configuration
- Pre-commit hooks automatically validate and format
- Test with
nix build - Deploy with
nixos-rebuild switch - Commit with validated changes
License
Personal configuration - not intended for redistribution