Personal NixOS configuration using flakes for declarative system management.
This repository contains my declarative NixOS system configuration, including:
- Window Manager: Sway (Wayland compositor)
- Terminal: Ghostty with JetBrains Mono
- Shell: Zsh with Starship prompt
- Display Manager: greetd with tuigreet
- Development: Docker, Git, Go, Node.js, various IDEs
<project-root>/
├── flake.nix # Flake configuration
├── flake.lock # Flake lock file
├── assets/images/ # Wallpapers and images
├── data/ # Shared data (hosts, constants, collections)
├── docs/ # Extended documentation
├── hosts/ # Per-host configs (configuration + hardware)
│ ├── corbelan/ # Laptop (headed)
│ ├── nostromo/ # Desktop (headed)
│ └── sulaco/ # Server (headless)
├── lib/ # Shared utility functions
├── modules/
│ ├── nixos/ # System modules, grouped by category
│ │ ├── core/ # boot, users, sudo, docker, xdg, greeter...
│ │ ├── system/ # sops, gcp
│ │ ├── theme/ # stylix
│ │ ├── network/ # networking, openssh, tailscale, mullvad
│ │ ├── hardware/ # gpu, bluetooth, fingerprint, audio...
│ │ ├── security/ # 1password, clamav, keyring
│ │ ├── desktop/ # sway
│ │ ├── gaming/ # steam, gamemode
│ │ └── services/ # headless services (jellyfin, caddy...)
│ └── home/ # Home Manager modules, grouped by category
│ ├── cli/ # terminal tools (zsh, yazi, lftp...)
│ ├── dev/ # git, go, editors
│ ├── desktop/ # sway, waybar, mako, cursor...
│ ├── apps/ # GUI apps (chromium, vesktop)
│ ├── pim/ # calendars, contacts
│ └── system/ # env vars, sops, ssh, xdg, syncthing
├── profiles/ # Aggregators selecting module sets per host
│ ├── base.nix # shared by every host
│ ├── headed.nix # desktop hosts (imports base)
│ ├── headless.nix # servers (imports base)
│ └── home/ # matching Home Manager profiles
├── secrets/ # sops-encrypted secrets
├── claude/ # Claude Code skills
└── users/
└── gray.nix # User module (HM wiring + SSH keys)
Hosts import a single profile (headed/headless), which pulls in base plus its category modules; host-specific hardware is imported directly by each host.
This configuration uses flakes, so you can rebuild directly from the repository without symlinks:
# Rebuild current host (auto-detected)
sudo nixos-rebuild <option> --flake .
# Rebuild specific host
sudo nixos-rebuild <option> --flake .#<host>- Setup internet if necessary:
# Connect to a WiFi network
nmcli device wifi connect <ssid> password <password>- Ensure flakes are enabled:
# Add to /etc/nixos/configuration.nix
nix.settings.experimental-features = [ "nix-command" "flakes" ];-
Clone this repository:
git clone https://github.com/graysonlee123/nixos cd nixos -
Build and activate the configuration:
# For current host (auto-detected) sudo nixos-rebuild switch --flake . # Or specify a host sudo nixos-rebuild switch --flake .#corbelan sudo nixos-rebuild switch --flake .#nostromo
If you want to connect to your Tailscale network, you'll have to create a key and authenticate:
sudo tailscale up --auth-key=KEY- curl, inxi
- ClamAV (antivirus)
- Fonts: Agave Nerd Font, Lora, Work Sans (via Stylix)
- Productivity: 1Password, Obsidian, Discord
- Development: Claude Code, VS Code, PhpStorm, Docker, Git
- Languages: Go (with gopls), Node.js 24, PHP 8.2 (with Composer)
- Browsers: Chromium (with WideVine)
- File Management: FileZilla, Yazi
- System Monitoring: btop, dust, dive
- Database Tools: pgcli, mycli, pgadmin4 (desktop mode)
- Git Tools: lazygit, git-crypt
- Docker Tools: lazydocker
- Terminal Tools: vim, fzf, ripgrep, tealdeer, zoxide
- Utilities: wl-clipboard, wp-cli, rclone, restic, satty (screenshots)
- Media: vlc, wf-recorder
- Entertainment: 2048-in-terminal, asciiquarium, crawl, nethack
- Other: tree, zip/unzip, jq, nixfmt, dig, speedtest-cli, pnpm
See docs/audio.md.
Virus signatures auto-updated via services.clamav.updater. Run a manual scan monthly:
clamscan -r --bell -i /home/graySee docs/syncthing.md.
- OpenSSH daemon
- Docker daemon
- NetworkManager
- Modifier: Super/Windows key (Mod4)
- Terminal: Ghostty
- App Launcher: Vicinae (Mod+d)
- Status Bar: Waybar
- Custom keybindings for window management and workspaces
- Font: JetBrains Mono Nerd Font
- Theme: Rose Pine Moon
- Shell: Zsh with Starship prompt
See docs/git.md.
Zoxide tracks your most used directories and lets you jump to them quickly:
z <pattern>- Jump to the highest-ranked directory matching the patternzi <pattern>- Interactive selection when multiple directories matchzoxide query <pattern>- Show which directory would be selected without jumping
Example: After visiting /home/gray/repos/me/nixos a few times, you can jump there with just z nix.
Chromium bookmarks are managed declaratively through lib/bookmarks.nix (data, git-crypt encrypted) and lib/mkChromiumBookmarks.nix (utility), which provides:
- Separate profiles: Personal and work bookmarks in different Chromium profiles
- Read-only enforcement: Bookmarks can only be changed via Nix configuration
- Version controlled: All bookmarks tracked in git
- Encrypted: Bookmark contents encrypted using git-crypt
How it works:
mkBookmark: Creates a single bookmark in Chromium's formatmkFolder: Creates a bookmark folder that can contain bookmarks/foldersconvertBookmark: Recursively converts simple bookmark definitions to Chromium formatmkChromiumBookmarks: Generates the complete Chromium bookmarks JSON file
See docs/hosts.md.
See docs/vpn.md.
# Rebuild and switch to new configuration
sudo nixos-rebuild switch --flake .
# Test configuration without making it default
sudo nixos-rebuild test --flake .
# Check for syntax errors
sudo nixos-rebuild build --flake .
# Rollback to previous generation
sudo nixos-rebuild switch --rollback
# List all generations
sudo nix-env --list-generations --profile /nix/var/nix/profiles/system
# Clean up old generations
sudo nix-collect-garbage -d
# Update flake inputs
nix flake update
# Run formatter
nix formatPrint: Screenshot with grim, satty and slurpSuper + Print: Open screen recording menu (region/fullscreen, with/without audio) via Vicinae. If a recording is already in progress, stops it immediately.
See docs/gaming.md.
See docs/development.md.
Managed with bluetui (TUI). Run bluetui to scan and pair devices.
- This configuration uses flakes and Home Manager for user-specific settings
- Unfree packages are enabled both system-wide and for the user
- Hardware configuration should not be manually edited (auto-generated)
- Each host has its own configuration directory under
hosts/
Personal configuration - use at your own risk.