diff options
Diffstat (limited to 'configs/claude.nix')
| -rw-r--r-- | configs/claude.nix | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/configs/claude.nix b/configs/claude.nix index 8f02532..9d12210 100644 --- a/configs/claude.nix +++ b/configs/claude.nix @@ -9,29 +9,13 @@ let tmux = "${pkgs.tmux}/bin/tmux -S /run/claude/tmux"; - # nixos-26.05 has 2.1.223; Opus 5.5 needs 2.1.280. From npm's platform - # package, which has the plain binary and an integrity hash; - # x86_64-linux only, like the package. - claude-code = pkgs.claude-code.overrideAttrs (_: rec { - version = "2.1.329"; - src = pkgs.fetchurl { - url = "https://registry.npmjs.org/@anthropic-ai/claude-code-linux-x64/-/claude-code-linux-x64-${version}.tgz"; - hash = "sha512-+n4lu1ubYAp02Y0X/MAUnxw9yY6SHHZ77F+IoW+V0wVoFuiI9opdH6gofjf14gXJCEYMTNpks7Gn1i8XZTKAWA=="; - }; - # installPhase installs $src as is. - preInstall = '' - tar -xzf $src package/claude - src=$PWD/package/claude - ''; - }); - # Root's way into claude's tmux. claude-attach = pkgs.writeShellScriptBin "claude-attach" '' exec ${tmux} attach -t claude ''; in { - nixpkgs.config.allowUnfreePredicate = pkg: lib.getName pkg == "claude-code"; + imports = [ ../modules/claude-code.nix ]; fc.home.required = true; @@ -65,7 +49,7 @@ in # tmpfs: fail rather than keep the state there. unitConfig.AssertPathIsMountPoint = "/home"; path = [ - claude-code + pkgs.claude-code config.nix.package pkgs.bash pkgs.coreutils @@ -91,7 +75,7 @@ in User = "claude"; WorkingDirectory = "/home/claude/src"; RuntimeDirectory = "claude"; - ExecStart = "${tmux} new-session -d -s claude ${lib.getExe claude-code} remote-control"; + ExecStart = "${tmux} new-session -d -s claude ${lib.getExe pkgs.claude-code} remote-control"; Restart = "always"; RestartSec = 10; }; |
