🫥 Mostly Nix dotfiles
nix nixos darwin doom-emacs dotfiles
README.md

expede's Dotfiles #

Nix configurations for NixOS. Floral-themed hostnames throughout.

Hosts #

Host Platform Type Description
dahlia x86_64-linux Desktop niri session, AMD GPU, Jellyfin, Steam
kielo x86_64-linux Server hel.subduction.keyhive.org
wisteria x86_64-linux Laptop Framework 13, niri session, fingerprint

Rebuild #

All commands run from the nix/ directory.

NixOS #

# Desktop
sudo nixos-rebuild switch --flake .#dahlia

# Server
sudo nixos-rebuild switch --flake .#kielo

Update Flake Inputs #

# Update all inputs
nix flake update

# Update specific input
nix flake update nixpkgs

Doom Emacs #

After changes to nix/modules/home/doom/:

doom sync

Initial Setup #

NixOS (dahlia / kielo) #

  1. Boot NixOS installer (minimal ISO recommended)

  2. Partition disks and mount at /mnt (host-specific, see nixos/hosts/<host>/hardware.nix)

  3. Clone this repo:

    nix-shell -p git
    git clone https://github.com/expede/dots.git /mnt/etc/nixos/dots
    
  4. Generate hardware config (optional, compare with existing):

    nixos-generate-config --root /mnt --show-hardware-config
    
  5. Install:

    cd /mnt/etc/nixos/dots/nix
    nixos-install --flake .#<hostname>
    
  6. After reboot, move dots to home and rebuild:

    sudo mv /etc/nixos/dots ~/Documents/dots
    sudo chown -R $USER:users ~/Documents/dots
    cd ~/Documents/dots/nix
    sudo nixos-rebuild switch --flake .#<hostname>
    
  7. Set Fish as default shell:

    chsh -s $(which fish)
    
  8. Install Doom Emacs (desktop only):

    git clone --depth 1 https://github.com/doomemacs/doomemacs ~/.config/emacs
    ~/.config/emacs/bin/doom install
    doom sync
    

Templates #

Rust #

Scaffold a new Rust project with pinned toolchain, nightly rustfmt, and dev commands:

# From any directory
nix flake init -t github:expede/dots#rust

# Enter dev shell
nix develop

Type menu in the dev shell to see available commands:

Command Description
build Compile the project
test Run tests (with watch mode)
lint Run clippy
fmt Format with nightly rustfmt
doc Generate documentation
watch Watch for changes

Configuration #

Edit nix/templates/rust/flake.nix (the template's own flake, not the repository's) to customize:

# Pin Rust version
rustVersion = "1.90.0";

# Enable cross-compilation targets (darwin, linux-musl, wasm, embedded)
enableCrossTargets = true;

Included Tools #

  • Toolchain: cargo, clippy, rust-src, rust-std, llvm-tools-preview
  • Formatting: nightly rustfmt, alejandra, taplo
  • Cargo extensions: cargo-deny, cargo-expand, cargo-nextest, cargo-outdated, cargo-sort, cargo-udeps, cargo-watch

Structure #

nix/
├── flake.nix              # Central flake with mkSystem abstraction
├── nixos/hosts/           # NixOS host configurations
├── templates/             # Project templates
│   └── rust/              # Rust project template
└── modules/home/          # Home-manager modules
    ├── hosts/             # Per-host overrides
    └── doom/              # Doom Emacs configuration