diff --git a/flake.lock b/flake.lock index 9b5e7ae..ccd3b87 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,27 @@ { "nodes": { + "claude-code": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1770362224, + "narHash": "sha256-glZjGWSy+LpalbwlsQ3iWNpWU4TlEOandYWOpl8sMt8=", + "owner": "sadjow", + "repo": "claude-code-nix", + "rev": "f4f8d6e7cc59e34e5a85550f017ead83ab925b22", + "type": "github" + }, + "original": { + "owner": "sadjow", + "ref": "main", + "repo": "claude-code-nix", + "type": "github" + } + }, "crane": { "locked": { "lastModified": 1765145449, @@ -31,6 +53,24 @@ "type": "github" } }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "gitignore": { "inputs": { "nixpkgs": [ @@ -194,6 +234,7 @@ }, "root": { "inputs": { + "claude-code": "claude-code", "home-manager": "home-manager", "lanzaboote": "lanzaboote", "nix-flatpak": "nix-flatpak", @@ -222,6 +263,21 @@ "repo": "rust-overlay", "type": "github" } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 8472307..2f91758 100644 --- a/flake.nix +++ b/flake.nix @@ -18,6 +18,10 @@ url = "github:nix-community/lanzaboote/v1.0.0"; inputs.nixpkgs.follows = "nixpkgs"; }; + claude-code = { + url = "github:sadjow/claude-code-nix/main"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { self, nixos-hardware, ... }@inputs: diff --git a/home-modules/dev.nix b/home-modules/dev.nix index fa7180b..bc710b7 100644 --- a/home-modules/dev.nix +++ b/home-modules/dev.nix @@ -43,6 +43,7 @@ dig nodejs_24 codex + claude-code opencode winbox4 ]; diff --git a/lib/mkNixosSystem.nix b/lib/mkNixosSystem.nix index 0620ca4..9f0e311 100644 --- a/lib/mkNixosSystem.nix +++ b/lib/mkNixosSystem.nix @@ -1,4 +1,13 @@ -{ self, nixpkgs, home-manager, nix-flatpak, plasma-manager, lanzaboote, ... }: +{ + self, + nixpkgs, + home-manager, + nix-flatpak, + plasma-manager, + lanzaboote, + claude-code, + ... +}: hardwareConfig: hostConfig: nixpkgs.lib.nixosSystem { @@ -8,6 +17,13 @@ nixpkgs.lib.nixosSystem { inherit plasma-manager; }; modules = [ + { + nixpkgs.overlays = [ claude-code.overlays.default ]; + nix.settings = { + substituters = [ "https://claude-code.cachix.org" ]; + trusted-public-keys = [ "claude-code.cachix.org-1:YeXf2aNu7UTX8Vwrze0za1WEDS+4DuI2kVeWEE4fsRk=" ]; + }; + } lanzaboote.nixosModules.lanzaboote hardwareConfig home-manager.nixosModules.home-manager