Skip to content

Migration

The full base.nix profile pulls in ~100+ packages including LLM tools, media tools, and VCS clients. For machines that only need essentials, the minimal profiles reduce closure size and build time.

## modules/hosts/<machine>/default.nix
extraModules = [
../../hjem/profiles/base.nix
../../hjem/profiles/development.nix
# ...
];

base.nix imports: core tools, search tools, terminal packages, shells, direnv, zellij, yt-dlp.

extraModules = [
../../hjem/profiles/minimal-darwin.nix # Darwin only
# or ../../hjem/profiles/base.nix with fewer app imports on NixOS
# Add only what you need:
# ../../hjem/profiles/development.nix
# ../../hjem/profiles/darwin.nix
];

minimal-darwin.nix includes: bash, fish, nushell, direnv, ripgrep, fd, jq, htop, curl, wget, git, neovim, fzf.

Switching from base.nix to minimal-darwin.nix removes:

Category Packages removed
Search bat, eza, television
Terminal core lla, rclone, croc, dufs, p7zip, ouch, sd, tokei, moreutils, fx, xan, glow, killall, dust, duf, zenith, fastfetch, w3m, doggo, gnupg, ffuf, mosh, gping, nmap, hub, gitu, jjui, lazyjj, chafa, mediainfo, asciinema, vhs, streamlink, lolcat, gnumake, pueue, wishlist
Terminal LLM gemini-cli, openskills, pi, rtk, agent-browser, aichat, mods, qemu, google-cloud-sdk, mcp-proxy, wakatime-cli
Apps zellij, yt-dlp, btop, tmux*, zstd

*tmux is in base.nix but not minimal-darwin.nix

  1. Create a test branch: git checkout -b test/minimal-<machine>
  2. Change the profile import in modules/hosts/<machine>/default.nix
  3. Build without deploying: nix build .#darwinConfigurations.<machine>.system or nix eval .#nixosConfigurations.<machine>.config.system.build.toplevel.drvPath --no-write-lock-file
  4. Test deploy: clan machines deploy <machine>
  5. Verify essentials work: shells, git, direnv, basic tools
  6. Add back profiles you need (development.nix, hyprland.nix, darwin.nix)

See New Machine Setup Guide for complete instructions.

Migrating Services to Tag-Based Deployment

Section titled “Migrating Services to Tag-Based Deployment”

Currently most services use explicit machines.vanessa = { ... }. To migrate to tag-based:

## Before
roles.default.machines.vanessa = { settings = { ... }; };
## After — deploys to all machines tagged "server"
roles.default.tags = [ "server" ];
roles.default.settings = { ... };

Caveats:

  • Per-machine settings (like specific ports or paths) can’t be defined via tag-level settings
  • Only migrate services where all target machines should have identical configuration
  • Test with nix flake check --no-build after changes