My personal declarative configuration for NixOS, managing my laptop and PC via Nix Flakes and Home Manager.
To set up this configuration on a fresh machine with NixOS installed, run:
# 1. Clone the repo
nix-shell -p git --run "git clone https://github.com/ErgoAsh/dotfiles.git ~/dotfiles"
# 2. Enter directory
cd ~/dotfiles
# 3. Apply the configuration
# Replace 'HOSTNAME' with: ergo-laptop, ergo-pc, or ergo-vm
sudo nixos-rebuild switch --flake .#HOSTNAME --option extra-experimental-features "nix-command flakes"dotfiles/
├── flake.nix # Main entry point and fleet definition
├── hosts/ # Machine-specific configurations
│ ├── ergo-laptop/ # Laptop configuration
│ ├── ergo-pc/ # Desktop PC configuration
│ └── ergo-vm/ # VM configuration
├── home/ # User-space configurations (home-manager)
│ ├── apps.nix # GUI applications and programs
│ ├── gui.nix # Hyprland, Waybar, window rules
│ ├── gui-laptop.nix # Laptop-specific GUI settings
│ ├── shell.nix # Shell configuration (Fish)
│ └── games.nix # Gaming-related packages
├── modules/ # Reusable NixOS modules
│ ├── core.nix # Base system configuration
│ ├── desktop.nix # Desktop environment setup
│ ├── laptop.nix # Laptop-specific settings
│ └── gaming.nix # Gaming configuration
└── wallpapers/ # Desktop wallpapers
- Window Manager: Hyprland (Wayland)
- Shell: Fish with vi keybindings
- Terminal: WezTerm
- Browser: LibreWolf + Tridactyl
- Editor: Helix
- Notes: Obsidian
- Reference Manager: Zotero
- Communication: Vesktop (Discord), Thunderbird
- LibreWolf
- Terminal
- IDEs
- Spotify
- Discord
- Obsidian
- Zotero
- Thunderbird
- TickTick
- Anki (key: 0)
- Ardour (key: )
Update dotfiles after changes:
cd ~/dotfiles
git add .
sudo nixos-rebuild switch --flake .#HOSTNAMERemove NixOS garbage manually (automatic cleanup is set to every 7 days):
sudo nix-collect-garbage -d