claude: deploy settings and skills as managed policy in /etc #1499

Merged
JakeHillion merged 1 commits from jj/orvslqxpyunr into main 2026-12-05 20:14:25 +00:00
Owner

Claude Code's user settings were a home-manager symlink into the Nix
store, so anything Claude Code saved there, such as a default model or a
/config toggle, was lost when the process exited.

Moved the declared settings to /etc/claude-code/managed-settings.json and
the skills to /etc/claude-code/.claude/skills, Claude Code's managed
locations on Linux. Managed settings and skills take precedence over the
user's own, so attribution, the Bash hook, the retry environment and the
plugin stay enforced, while ~/.claude/settings.json becomes a real file in
the persisted ~/.claude that Claude Code can write.

Test plan:

  • CI
  • Built maverick's toplevel: /etc/claude-code holds managed-settings.json
    with the declared keys and the five skills
Claude Code's user settings were a home-manager symlink into the Nix store, so anything Claude Code saved there, such as a default model or a /config toggle, was lost when the process exited. Moved the declared settings to /etc/claude-code/managed-settings.json and the skills to /etc/claude-code/.claude/skills, Claude Code's managed locations on Linux. Managed settings and skills take precedence over the user's own, so attribution, the Bash hook, the retry environment and the plugin stay enforced, while ~/.claude/settings.json becomes a real file in the persisted ~/.claude that Claude Code can write. Test plan: - CI - Built maverick's toplevel: /etc/claude-code holds managed-settings.json with the declared keys and the five skills
JakeHillion force-pushed jj/orvslqxpyunr from 29b3f0c355 to 351bcc1fe0 2026-12-05 19:05:36 +00:00 Compare
JakeHillion added 1 commit 2026-12-05 20:07:49 +00:00
claude: deploy settings and skills as managed policy in /etc
commit-validation / validate-single-commit (pull_request) Successful in 8s
buildbot/nix-eval Build done. (30 warnings)
buildbot/nix-build Build done.
buildbot/nix-effects Build done.
d1250e63eb
Claude Code's user settings were a home-manager symlink into the Nix
store, so anything Claude Code saved there, such as a default model or a
/config toggle, was lost when the process exited.

Moved the declared settings to /etc/claude-code/managed-settings.json and
the skills to /etc/claude-code/.claude/skills, Claude Code's managed
locations on Linux. Managed settings and skills take precedence over the
user's own, so attribution, the Bash hook, the retry environment and the
plugin stay enforced, while ~/.claude/settings.json becomes a real file in
the persisted ~/.claude that Claude Code can write. Auto mode is also
made the default permission mode, since choosing it with Shift+Tab lasts
only for the session.

Test plan:
- CI
- Built maverick's toplevel: /etc/claude-code holds managed-settings.json
  with the declared keys and the five skills
JakeHillion force-pushed jj/orvslqxpyunr from 351bcc1fe0 to d1250e63eb 2026-12-05 20:07:49 +00:00 Compare
JakeHillion merged commit d1250e63eb into main 2026-12-05 20:14:25 +00:00
JakeHillion deleted branch jj/orvslqxpyunr 2026-12-05 20:14:26 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: JakeHillion/nixos#1499