Add use flake for fresh claude code
This commit is contained in:
@@ -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";
|
||||
|
||||
|
||||
24
flake.lock
generated
24
flake.lock
generated
@@ -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",
|
||||
|
||||
23
flake.nix
23
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,7 +158,8 @@
|
||||
mkSystem cfg.arch nixpkgs cfg.configurationPath hostname)
|
||||
machineHosts
|
||||
//
|
||||
(let
|
||||
(
|
||||
let
|
||||
mkEphemeral = system: nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
@@ -154,10 +167,12 @@
|
||||
inputs.nix-index-database.nixosModules.default
|
||||
];
|
||||
};
|
||||
in {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user