Home-manager fails on the dev microVM because nix-env --set needs writable nix state dirs, but the microVM shares /nix/store read-only via virtiofs. Extract shared claude-code settings into settings.nix, add a NixOS module (nixos.nix) that deploys the same files via a systemd oneshot service with RequiresMountsFor to handle virtiofs mount ordering. The nb host continues using home-manager unchanged.
22 lines
722 B
Nix
22 lines
722 B
Nix
{ config, lib, pkgs, ... }:
|
|
let
|
|
settings = import ./settings.nix { homeDir = config.home.homeDirectory; };
|
|
in
|
|
{
|
|
home.file = {
|
|
# Agents
|
|
".claude/agents/devil-advocate.md".source = ./agents/devil-advocate.md;
|
|
".claude/agents/lint-fixer.md".source = ./agents/lint-fixer.md;
|
|
".claude/agents/secret-scanner.md".source = ./agents/secret-scanner.md;
|
|
".claude/agents/test-runner.md".source = ./agents/test-runner.md;
|
|
|
|
# Statusline script
|
|
".claude/statusline-command.sh" = {
|
|
source = ./statusline-command.sh;
|
|
executable = true;
|
|
};
|
|
|
|
# Settings (local override — leaves settings.json writable for Claude)
|
|
".claude/settings.local.json".text = builtins.toJSON settings;
|
|
};
|
|
}
|