Skip to content

bloodstiller/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NixOS Configuration

Overview

This repository contains my personal NixOS system configuration using Nix flakes. It’s built on NixOS unstable and provides a Wayland-first experience with Hyprland.

Key Features

  • Full Wayland desktop with Hyprland
  • UK English locale and keyboard settings
  • LUKS encryption on drives
  • Advanced power management with auto-cpufreq and TLP
  • Tailscale VPN with Mullvad exit nodes
  • Automated secrets management with Sops
  • Comprehensive development environment

Structure

System Modules (./modules/)

modules/
├── appimages.nix           # AppImage support + binfmt config
├── bluetooth.nix           # Bluetooth + Blueman management
├── bootloader.nix          # Systemd-boot + LUKS encryption
├── cpu.nix                 # CPU management + power settings
├── de.nix                  # Hyprland + Wayland + XDG portals
├── fonts.nix               # Nerd Fonts + System fonts
├── kernel.nix              # Zen kernel configuration
├── keyboard.nix            # UK layout + Caps:Escape
├── locale.nix              # UK English locale settings
├── network.nix             # NetworkManager + SSH
├── nfs.nix                 # Network storage + mount points
├── nix.nix                 # Package manager + GC settings
├── nvidia.nix              # NVIDIA drivers + Prime
├── pkgs.nix                # Core system packages
├── security.nix            # GPG + Sops + Polkit
├── sound.nix               # Pipewire audio stack
├── tailscale.nix           # VPN + auto-connect
├── users.nix               # User management + SSH keys
├── virtualization.nix      # Docker + QEMU + VirtualBox
└── x11.nix                 # XFCE + LightDM

Custom Packages (./packages/)

packages/
├── alacritty/             # Terminal emulator
├── atuin/                 # Shell history manager
├── claude/                # Claude AI integration
├── cursor/                # AI-powered editor
├── doom/                  # Emacs configuration
├── dropbox/               # Dropbox sync client
├── dunst/                 # Notifications
├── foot/                  # Terminal emulator
├── home-manager/          # User environment
│   └── modules/          
│       ├── base.nix       # Base user config
│       ├── cli-tools.nix  # CLI utilities
│       ├── git.nix        # Git configuration
│       └── theme.nix      # Theme settings
├── hypr/                # Window manager
│   ├── config/          # Hyprland config
│   ├── scripts/         # WM scripts
│   └── hyprland.nix     # WM package
├── kitty/                # Terminal emulator
├── nvim/                 # Neovim configuration
│   ├── plugins/          # Plugin definitions
│   └── neovim-plugins/   # Custom plugins
├── packages/             # Custom Nix packages
├── Pia/                  # VPN client
├── scripts/              # Custom utilities
│   └── scripts/         # Shell scripts
├── secrets/              # Secrets management
├── sops/                 # Secrets configuration
├── starship/             # Shell prompt
├── temp/                 # Temporary files
├── tmux/                 # Terminal multiplexer
├── waybar/               # Status bar
├── wezterm/              # Terminal emulator
├── work/                 # Work-specific config
├── wofi/                 # Application launcher
├── yazi/                 # File manager
└── zsh/                  # Shell configuration

Home Manager (./packages/home-manager/)

User environment configuration managing:

  • Shell: ZSH with custom plugins and Starship prompt
  • Development: Neovim, Emacs, Git, Cursor
  • Desktop: Wayland tools suite
  • CLI tools: eza, bat, fd, ripgrep
  • Services: Dropbox, GPG agent
  • Dotfiles: Automated management

Flake Configuration

This repository uses a Nix flake-based setup for reproducible and modular system configuration. The main flake.nix file defines all system inputs and outputs.

Key Inputs

  • **nixpkgs**: Main NixOS package set, tracking the 25.05 release.
  • **nixpkgs-unstable**: Provides access to the latest unstable packages for select use cases.
  • **home-manager**: Manages user environments and dotfiles, following the 25.05 release.
  • **agenix**: For managing secrets with age encryption.
  • **sops-nix**: For secrets management using Sops and age.
  • **hyprland**: Wayland compositor and related tools (hyprland, hypridle, hyprlock, pyprland) from upstream git.
  • **nixos-hardware**: Hardware-specific optimizations (optional, can be enabled for your device).
  • **nvf**: Neovim configuration framework.
  • **nix-colors**: Optional, for theming and color schemes.

Unstable Parts

  • The flake includes both stable (25.05) and unstable (nixos-unstable) nixpkgs channels. This allows you to use the latest packages where needed, while keeping the system base stable.
  • Some packages or modules may explicitly use nixpkgs-unstable for newer features or bugfixes.
  • Hyprland and related compositors are tracked from their upstream git repositories, ensuring you get the latest features and fixes for Wayland.

Example: Adding/Using Unstable Packages

You can reference unstable packages in your modules or home-manager configs by importing from the `nixpkgs-unstable` input, e.g.:

inputs.nixpkgs-unstable.legacyPackages.x86_64-linux.yourPackage

System Outputs

  • The flake defines a `nixosConfigurations.zeus` output for your main system, and a `packages.default` output for your Neovim configuration.

See the flake.nix file for full details and customization options.

Installation

Prerequisites

  • NixOS installation media
  • UEFI system
  • Internet connection
  • (Optional) NVIDIA GPU

Basic Setup

# Clone repository
git clone https://github.com/bloodstiller/dotfiles.git ~/.dotfiles

# Review and modify hardware configuration
nano ~/.dotfiles/modules/hardware.nix

# Build and activate
cd ~/.dotfiles
sudo nixos-rebuild switch --flake .

Post-Installation

  1. Set up GPG keys
  2. Configure SSH keys
  3. Import secrets
  4. Set up Neovim/Emacs

Updating

# Update all flake inputs
nix flake update

# Apply updates
sudo nixos-rebuild switch --flake .

# Update and apply in one command
sudo nixos-rebuild switch --recreate-lock-file --flake .

Development Setup

Editor Configuration

  • Neovim with extensive plugin configuration
  • Doom Emacs (managed outside home-manager)
  • Cursor (AI-powered VSCode)
  • Custom snippets and templates

Virtual Environments

  • Docker containers
  • QEMU/KVM virtual machines
  • VirtualBox support

Notes

  • System state version: 25.05
  • Wayland-first with X11 fallback
  • Encrypted storage by default
  • Advanced power management with auto-cpufreq, TLP, and undervolting
  • Tailscale VPN with Mullvad exit nodes
  • Comprehensive font setup with Nerd Fonts

Troubleshooting

Common Issues

  • NVIDIA: Ensure kernel modules match driver version
  • Virtualization: Enable CPU virtualization in BIOS
  • Audio: Check Pipewire service status

Logs

  • System: /var/log/messages
  • Hyprland: $XDG_CACHE_HOME/hyprland/hyprland.log
  • Home Manager: $HOME/.local/state/nix/profiles

Additional Resources

About

My DotFiles

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published