diff --git a/common/sandboxed-workspace/base.nix b/common/sandboxed-workspace/base.nix index 11947e0..548ed27 100644 --- a/common/sandboxed-workspace/base.nix +++ b/common/sandboxed-workspace/base.nix @@ -18,6 +18,10 @@ hostConfig.inputs.nix-index-database.nixosModules.default ]; + nixpkgs.overlays = [ + hostConfig.inputs.claude-code-nix.overlays.default + ]; + # Basic system configuration system.stateVersion = "25.11"; diff --git a/flake.lock b/flake.lock index 972cfdb..4b0215d 100644 --- a/flake.lock +++ b/flake.lock @@ -43,6 +43,29 @@ "type": "gitlab" } }, + "claude-code-nix": { + "inputs": { + "flake-utils": [ + "flake-utils" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1770491193, + "narHash": "sha256-zdnWeXmPZT8BpBo52s4oansT1Rq0SNzksXKpEcMc5lE=", + "owner": "sadjow", + "repo": "claude-code-nix", + "rev": "f68a2683e812d1e4f9a022ff3e0206d46347d019", + "type": "github" + }, + "original": { + "owner": "sadjow", + "repo": "claude-code-nix", + "type": "github" + } + }, "dailybot": { "inputs": { "flake-utils": [ @@ -295,6 +318,7 @@ "root": { "inputs": { "agenix": "agenix", + "claude-code-nix": "claude-code-nix", "dailybot": "dailybot", "deploy-rs": "deploy-rs", "flake-compat": "flake-compat", diff --git a/flake.nix b/flake.nix index b3eea67..5705105 100644 --- a/flake.nix +++ b/flake.nix @@ -72,6 +72,15 @@ url = "github:astro/microvm.nix"; inputs.nixpkgs.follows = "nixpkgs"; }; + + # Up to date claude-code + claude-code-nix = { + url = "github:sadjow/claude-code-nix"; + inputs = { + nixpkgs.follows = "nixpkgs"; + flake-utils.follows = "flake-utils"; + }; + }; }; outputs = { self, nixpkgs, ... }@inputs: @@ -96,7 +105,10 @@ self.nixosModules.kernel-modules ({ lib, ... }: { config = { - nixpkgs.overlays = [ self.overlays.default ]; + nixpkgs.overlays = [ + self.overlays.default + inputs.claude-code-nix.overlays.default + ]; environment.systemPackages = [ agenix.packages.${system}.agenix @@ -146,18 +158,21 @@ mkSystem cfg.arch nixpkgs cfg.configurationPath hostname) machineHosts // - (let - mkEphemeral = system: nixpkgs.lib.nixosSystem { - inherit system; - modules = [ - ./machines/ephemeral/minimal.nix - inputs.nix-index-database.nixosModules.default - ]; - }; - in { - ephemeral-x86_64 = mkEphemeral "x86_64-linux"; - ephemeral-aarch64 = mkEphemeral "aarch64-linux"; - }); + ( + let + mkEphemeral = system: nixpkgs.lib.nixosSystem { + inherit system; + modules = [ + ./machines/ephemeral/minimal.nix + inputs.nix-index-database.nixosModules.default + ]; + }; + in + { + ephemeral-x86_64 = mkEphemeral "x86_64-linux"; + ephemeral-aarch64 = mkEphemeral "aarch64-linux"; + } + ); # kexec produces a tarball; for a self-extracting bundle see: # https://github.com/nix-community/nixos-generators/blob/master/formats/kexec.nix#L60