A declarative NixOS system configuration using flakes and home-manager.
- Declarative configuration using Nix flakes for full reproducibility
- Multi-host support with per-machine customization
- Automated hardware detection and configuration
- Home-manager integration for user-level package and dotfile management
- Hyprland Wayland compositor with dynamic tiling
- Waybar status bar with custom styling
- Fuzzel application launcher
- Foot terminal emulator
- Hyprlock screen locker
- Neovim with custom configuration
- Tmux terminal multiplexer
- Starship cross-shell prompt
- Git with personalized settings
- Custom package overlays for bleeding-edge software
- Declarative package installation
- Custom overlays in
overlays/directory - Reproducible builds across machines
- Rollback capability for system configurations
- NixOS installed on your system
- Git for cloning the repository
- Flakes enabled in your Nix configuration
Clone the repository:
git clone [email protected]:JDongian/.dotfiles.git /etc/nixos
cd /etc/nixosFor the default host:
sudo nixos-rebuild switch --flake .#tileFor other hosts (when added):
sudo nixos-rebuild switch --flake .#hostnameUpdate flake inputs:
nix flake updateRebuild after updating:
sudo nixos-rebuild switch --flake .#tile.
├── flake.nix # Flake configuration with inputs and outputs
├── flake.lock # Locked flake dependencies
├── configuration.nix # Main system configuration
├── home.nix # Home-manager configuration for user joshua
├── hosts/ # Host-specific configurations
│ └── tile/ # ThinkPad T490s
│ ├── default.nix # Host entry point
│ ├── hardware-configuration.nix # Auto-generated hardware config
│ └── hardware.nix # Hardware-specific tweaks
├── dotfiles/ # Application dotfiles
│ ├── bashrc # Bash configuration
│ ├── foot/ # Foot terminal config
│ ├── fuzzel/ # Fuzzel launcher config
│ ├── hypr/ # Hyprland and Hyprlock config
│ ├── nvim/ # Neovim configuration
│ ├── starship.toml # Starship prompt config
│ ├── tmux/ # Tmux configuration
│ └── waybar/ # Waybar config and styling
└── overlays/ # Custom package overlays
└── code-cursor-latest.nix # Code Cursor editor overlay
-
Generate hardware configuration on the target machine:
nixos-generate-config --show-hardware-config > /tmp/hardware-configuration.nix -
Create host directory and files:
mkdir -p hosts/hostname mv /tmp/hardware-configuration.nix hosts/hostname/
-
Create
hosts/hostname/default.nix:{ config, pkgs, lib, ... }: { imports = [ ../../configuration.nix ./hardware-configuration.nix ./hardware.nix # Optional: host-specific tweaks ]; }
-
Add the new host to
flake.nixoutputs:nixosConfigurations.hostname = nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs system; }; modules = [ ./hosts/hostname inputs.home-manager.nixosModules.default # ... rest of modules ]; };
-
Build and switch:
sudo nixos-rebuild switch --flake .#hostname
See the NixOS Manual for general NixOS documentation.
See the Home Manager Manual for user environment configuration.
tile - ThinkPad T490s running NixOS unstable with Hyprland
Inspired by:
- bbigras/nix-config - Modular configuration structure
- NixOS community - Countless examples and support
- Claude - The real captain now (I use Claude btw)
