🫥 Mostly Nix dotfiles
nix nixos darwin doom-emacs dotfiles
0

Configure Feed

Select the types of activity you want to include in your feed.

Nix 78.3%
Emacs Lisp 8.7%
GLSL 6.4%
TypeScript 6.1%
QML 0.2%
Other 0.3%
159 1 0

Clone this repository

https://git.vm.fail/expede.wtf/dots https://git.vm.fail/did:plc:uzur2xk5bcmp54d6vjzrpwfy
ssh://git@knot1.tangled.sh:2222/expede.wtf/dots ssh://git@knot1.tangled.sh:2222/did:plc:uzur2xk5bcmp54d6vjzrpwfy

For self-hosted knots, clone URLs may differ based on your setup.


README.md

expede's Dotfiles#

Multi-platform Nix configurations for macOS and NixOS. Coffee-themed hostnames throughout.

Hosts#

Host Platform Type Description
Latte aarch64-darwin Desktop macOS, 1Password SSH, Homebrew
dahlia x86_64-linux Desktop GNOME + Hyprland, AMD GPU
kielo x86_64-linux Server hel.subduction.keyhive.org

Rebuild#

All commands run from the nix/ directory.

macOS (Latte)#

darwin-rebuild switch --flake .#Latte

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 lock --update-input nixpkgs

Doom Emacs#

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

doom sync

Initial Setup#

macOS (Latte)#

  1. Install Nix (Determinate Systems installer recommended):

    curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
    
  2. Clone this repo:

    git clone https://github.com/expede/dots.git ~/Documents/dots
    cd ~/Documents/dots/nix
    
  3. Bootstrap nix-darwin (first run only):

    nix run nix-darwin -- switch --flake .#Latte
    
  4. Subsequent rebuilds use:

    darwin-rebuild switch --flake .#Latte
    
  5. Set Fish as default shell:

    echo /run/current-system/sw/bin/fish | sudo tee -a /etc/shells
    chsh -s /run/current-system/sw/bin/fish
    
  6. Install Doom Emacs:

    git clone --depth 1 https://github.com/doomemacs/doomemacs ~/.config/emacs
    ~/.config/emacs/bin/doom install
    doom sync
    
  7. Configure 1Password SSH agent — enable in 1Password settings:

    • Settings > Developer > SSH Agent > Enable
    • Settings > Developer > CLI > Enable CLI integration

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 flake.nix 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
├── darwin/                # macOS-specific (nix-darwin)
├── 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