dot

NixOS dotfiles
git clone https://git.echoz.io/dot.git
Log | Files | Refs

default.nix (1661B)


      1 { user, ... }:
      2 {
      3   environment.persistence."/fix".users.${user} = {
      4     directories = [ ".claude" ];
      5     files = [ ".claude.json" ];
      6   };
      7 
      8   home-manager.users.${user} =
      9     { config, ... }:
     10     {
     11       nixpkgs.config.allowUnfree = true;
     12 
     13       programs.claude-code = {
     14         enable = true;
     15         context = ''
     16           ## Git workflow
     17 
     18           Always create a feature branch for any code change — never commit directly to the default branch.
     19 
     20           When merging a PR: squash merge, then delete both the remote and local branch.
     21 
     22           Don't add a PR body unless the change genuinely warrants explanation beyond the title.
     23         '';
     24         settings = {
     25           permissions = {
     26             allow = [
     27               "Read(//nix/store/*)"
     28             ];
     29           };
     30           sandbox = {
     31             enabled = true;
     32             excludedCommands = [
     33               "nix *"
     34               "gh *"
     35               "git push"
     36               "git push *"
     37               "git pull"
     38               "git pull *"
     39               "git commit *"
     40               "git fetch"
     41               "git fetch *"
     42             ];
     43             filesystem = {
     44               denyRead = [ "/" ];
     45               allowRead = [
     46                 "/nix"
     47                 "/run/current-system"
     48               ];
     49             };
     50           };
     51           effortLevel = "medium";
     52           model = "opusplan";
     53         };
     54         mcpServers.agentgateway = {
     55           type = "http";
     56           url = "https://mcp.stafftastic.com/mcp/http";
     57         };
     58       };
     59 
     60       home.file."${config.programs.claude-code.configDir}/settings.json" = {
     61         mutable = true;
     62         force = true;
     63       };
     64     };
     65 }