How twilightty/.dotfiles-nix works
Project type and purpose
• This is a multi-platform “dotfiles” management system built on Nix flakes.
• It centralizes and version-controls your shell, editor, window manager, and system configuration for both macOS (Darwin) and Linux (NixOS).
• Uses Home Manager for per-user settings and NixOS/darwin-rebuild for system-level configuration.
File structure
• Top-level:
• .gitignore, README.md – repo metadata
• flake.nix, flake.lock – Nix flake entrypoint and lockfile
• Directories:
• linux/ – NixOS modules (sysconfig), per-desktop environment configs (de), package sets (apps)
• shared/ – cross-OS Home Manager modules for nvim, tmux, shell plugins
• Key patterns:
• Each OS has its own flake.nix referencing shared/ for common modules.
• home-manager on both platforms plus nixos-rebuild under linux/sysconfig.
• Cachix is recommended for binary caching.
README for additional insights
• Commands:
• darwin-rebuild switch --flake . (macOS)
• home-manager switch --flake .#kirb + sudo nixos-rebuild switch --flake . (Linux)
• Emphasis on enabling Cachix for prebuilt binaries.