mirror of
https://github.com/nix-community/home-manager.git
synced 2026-12-06 04:40:17 +00:00
Keep user settings and marketplace registrations writable while applying declared values. Seed required marketplace metadata only where missing, preserving saved timestamps and update flags. Retain the immutable default.
25 lines
646 B
Nix
25 lines
646 B
Nix
{ config, ... }:
|
|
{
|
|
programs.claude-code = {
|
|
enable = true;
|
|
package = null;
|
|
mutableSettings = true;
|
|
};
|
|
|
|
assertions = [
|
|
{
|
|
assertion = config.programs.claude-code.mutableSettings;
|
|
message = "Mutable Claude Code settings must remain enabled for an empty configuration.";
|
|
}
|
|
{
|
|
assertion = !(config.home.activation ? claudeCodeSettings);
|
|
message = "Empty Claude Code settings must not register mutable settings activation.";
|
|
}
|
|
];
|
|
|
|
nmt.script = ''
|
|
assertPathNotExists "home-files/.claude/settings.json"
|
|
assertPathNotExists "home-files/.claude/plugins/known_marketplaces.json"
|
|
'';
|
|
}
|