▗▄▄▄ ▗▄▄▄▄ ▄▄▄▖
▜███▙ ▜███▙ ▟███▛
▜███▙ ▜███▙▟███▛
▜███▙ ▜██████▛
▟█████████████████▙ ▜████▛ ▟▙
▟███████████████████▙ ▜███▙ ▟██▙
▄▄▄▄▖ ▜███▙ ▟███▛
▟███▛ ▜██▛ ▟███▛
▟███▛ ▜▛ ▟███▛
▟███████████▛ ▟██████████▙
▜██████████▛ ▟███████████▛
▟███▛ ▟▙ ▟███▛
▟███▛ ▟██▙ ▟███▛
▟███▛ ▜███▙ ▝▀▀▀▀
▜██▛ ▜███▙ ▜██████████████████▛
▜▛ ▟████▙ ▜████████████████▛
▟██████▙ ▜███▙
▟███▛▜███▙ ▜███▙
▟███▛ ▜███▙ ▜███▙
▝▀▀▀ ▀▀▀▀▘ ▀▀▀▘
This comprises most of my dotfiles, managed (mostly) by nix.
# First install (if nh not yet available)
nix run nixpkgs#nh -- darwin switch
# Regular use (with NH_FLAKE set)
nh darwin switch # Apply configuration
nh darwin switch --refresh --commit-lock-file # Update inputs and commit
nh darwin test # Test without activation
nh darwin build # Build without activation
# Cleanup
nh clean all # Clean old generations
nh clean all --keep 3 --keep-since 7d # Keep last 3 or within 7 daysSet these in your shell or via the NixOS/home-manager module:
export NH_FLAKE="$HOME/path/to/flake" # Auto-detect flake location
export NH_SHOW_ACTIVATION_LOGS=1 # Show activation output (useful for debugging)# Start Lima VM
limactl start --name=default lima.yaml
# Build and apply NixOS configuration
lima -- nh os switch --refresh '#nostromo'
lima -- nh os test # Test without activationTo create a separate repository that consumes this flake for host-specific configurations (i.e., my work machine):
nix flake init -t github:roshbhatia/sysinit#discrete