agentleFS
olafkfreundolafkfreund/nix-skills/skills/home-manager/SKILL.md

home-manager

Skill9 starsChanged 55 days agoMITView on GitHub

Configure and troubleshoot Home Manager user environments on NixOS, nix-darwin or standalone Linux and macOS installations.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. aiunlocked1412/claude-skill-unlock★ 18same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository10 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the repository instructions, flake inputs, target host, imports, and existing Home Manager modules before editing.

    line 8
  2. Distinctive:

    If the signs are ambiguous, ask rather than guess.

    line 23
  3. Distinctive:

    Use configuration for user settings and package placement, dotfiles for managed files, modular services for service modules, and [writing

    line 30
  4. Very specific:

    Keep home.stateVersion stable unless deliberately performing a migration.

    line 35
  5. Very specific:

    Prefer existing programs, services, home.packages, home.file, and xdg.configFile options over custom generation.

    line 36
  6. Distinctive:

    Check the user's actual Home Manager revision before relying on version- specific options.

    line 50
  7. Very specific:

    Never search /nix/store (for example find /nix/store/*foo-* -name libfoo.so) and never copy a literal store path.

    line 55
  8. Very specific:

    Do not quote attribute names that are valid identifiers ([A-Za-z_][A-Za-z0-9_'-]*, dashes included).

    line 59

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Home Manager

Read the repository instructions, flake inputs, target host, imports, and existing Home Manager modules before editing. Preserve the project's module and feature-flag conventions.

Find the installation mode first

How Home Manager is installed decides which instructions apply and how changes take effect:

ModeSignsReferenceChanges are applied by
NixOS modulehome-manager.nixosModules imported and home-manager.users.<name> in a NixOS configurationNixOS moduleThe host's NixOS rebuild workflow
nix-darwin modulehome-manager.darwinModules imported and home-manager.users.<name> in a darwinConfigurations entryinstallation, flakesdarwin-rebuild
StandaloneA homeConfigurations flake output, or ~/.config/home-manager/home.nix, and the home-manager commandinstallation, flakeshome-manager switch

If the signs are ambiguous, ask rather than guess. A standalone example is not a reason to change a module-based setup, or the reverse. For nix-darwin itself, use the nix-darwin skill if it is installed, or the nix-darwin documentation.

Configure

Use configuration for user settings and package placement, dotfiles for managed files, modular services for service modules, and writing modules when extending Home Manager.

Keep home.stateVersion stable unless deliberately performing a migration. Prefer existing programs, services, home.packages, home.file, and xdg.configFile options over custom generation.

Apply, update and roll back

Apply changes through the system manager that owns Home Manager in this mode. That is the NixOS or nix-darwin rebuild for module installs, and never home-manager switch for them. See updating and rollbacks.

Switching, rolling back, expiring generations and updating inputs change the user's environment. Propose them with the exact command, and run them only with the user's authorization.

Check the user's actual Home Manager revision before relying on version- specific options. Validate the flake and use a dry build before deployment.

Nix style

  • Never search /nix/store (for example find /nix/store/*foo-* -name libfoo.so) and never copy a literal store path. Find the providing package with nix-locate, and refer to it through Nix: ${pkgs.foo}/lib or lib.makeLibraryPath [ pkgs.foo ].
  • Do not quote attribute names that are valid identifiers ([A-Za-z_][A-Za-z0-9_'-]*, dashes included). Write pkgs.foo-bar and packages.x86_64-linux, not pkgs."foo-bar". Quote only other names (".config/foo", "2.0"), the keywords assert else if in inherit let or rec then with, and interpolations ("${name}"). Upstream examples in references sometimes quote needlessly; do not copy that style.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.