refactor(#2111): remove nixpkgs-unstable, source claude-code from main nixpkgs
This commit is contained in:
parent
26dd8b0d34
commit
ae41e39dfb
8 changed files with 26 additions and 147 deletions
28
flake.nix
28
flake.nix
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
|
||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
# Crane (replaces the former naersk-based build). Stateless — no nixpkgs input to
|
||||
# follow; `crane.mkLib pkgs` returns the lib at whatever pkgs we
|
||||
# pass it (we use the project's pinned nixpkgs).
|
||||
|
|
@ -18,7 +17,6 @@
|
|||
inputs@{
|
||||
self,
|
||||
nixpkgs,
|
||||
nixpkgs-unstable,
|
||||
crane,
|
||||
treefmt-nix,
|
||||
}:
|
||||
|
|
@ -267,24 +265,6 @@
|
|||
# in-container agent docs dir from it.
|
||||
hyperhive-docs = self.packages.${prev.stdenv.hostPlatform.system}.reference-docs;
|
||||
};
|
||||
claude-unstable =
|
||||
final: prev:
|
||||
let
|
||||
# The overlay imports its own nixpkgs-unstable instance to
|
||||
# pin claude-code there. That instance has its own config
|
||||
# (independent from the user's prev.config), so we have to
|
||||
# set allowUnfreePredicate inline to whitelist claude-code
|
||||
# specifically — otherwise the unstable import itself
|
||||
# refuses to evaluate. This is scoped: only claude-code
|
||||
# bypasses unfree, nothing else.
|
||||
unstable = import nixpkgs-unstable {
|
||||
inherit (prev.stdenv.hostPlatform) system;
|
||||
config.allowUnfreePredicate = pkg: builtins.elem (prev.lib.getName pkg) [ "claude-code" ];
|
||||
};
|
||||
in
|
||||
{
|
||||
inherit (unstable) claude-code;
|
||||
};
|
||||
};
|
||||
|
||||
nixosModules = {
|
||||
|
|
@ -295,18 +275,11 @@
|
|||
# overlay (which would also pollute their host pkgs with our
|
||||
# build), we thread the package straight from this flake's
|
||||
# `packages.<system>.default` via a `hyperhivePackage` argument.
|
||||
# The `claude-unstable` overlay only matters inside our container
|
||||
# builds (already applied internally in `nixosConfigurations`).
|
||||
hive-c0re = import ./nix/modules/hive-c0re.nix {
|
||||
hyperhivePackage = system: self.packages.${system}.default;
|
||||
hyperhiveFrontend = system: self.packages.${system}.frontend;
|
||||
hyperhiveAssets = system: self.packages.${system}.assets;
|
||||
hyperhiveFlake = "${hyperhiveFlakeSource}";
|
||||
# Store path of the nixpkgs-unstable input this flake was evaluated
|
||||
# with — the channel that carries claude-code. Passed as the default
|
||||
# for `services.hyperhive.c0re.nixpkgsUnstableFlake` so operators can
|
||||
# override it without touching this file.
|
||||
hyperhiveNixpkgsUnstable = "path:${nixpkgs-unstable}";
|
||||
# Per-container toplevels — wired into `system.extraDependencies`
|
||||
# when `services.hyperhive.c0re.preBuildAgentTemplates` is on so the
|
||||
# host system closure pre-fetches the heavy build inputs.
|
||||
|
|
@ -340,7 +313,6 @@
|
|||
{
|
||||
nixpkgs.overlays = [
|
||||
self.overlays.default
|
||||
self.overlays.claude-unstable
|
||||
];
|
||||
}
|
||||
];
|
||||
|
|
|
|||
Loading…
Reference in a new issue