Migration
Migrating to Minimal Profiles
Section titled “Migrating to Minimal Profiles”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.
Before (full profile)
Section titled “Before (full profile)”## modules/hosts/<machine>/default.nixextraModules = [ ../../hjem/profiles/base.nix ../../hjem/profiles/development.nix # ...];base.nix imports: core tools, search tools, terminal packages, shells, direnv, zellij, yt-dlp.
After (minimal profile)
Section titled “After (minimal profile)”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.
What you lose
Section titled “What you lose”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
Migration steps
Section titled “Migration steps”- Create a test branch:
git checkout -b test/minimal-<machine> - Change the profile import in
modules/hosts/<machine>/default.nix - Build without deploying:
nix build .#darwinConfigurations.<machine>.systemornix eval .#nixosConfigurations.<machine>.config.system.build.toplevel.drvPath --no-write-lock-file - Test deploy:
clan machines deploy <machine> - Verify essentials work: shells, git, direnv, basic tools
- Add back profiles you need (development.nix, hyprland.nix, darwin.nix)
Adding a New Machine to Existing Clan
Section titled “Adding a New Machine to Existing Clan”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:
## Beforeroles.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-buildafter changes