Simplify nixpkgs eval

This commit is contained in:
Greg Hellings
2025-12-18 10:51:09 -06:00
parent 2506557368
commit 36526b4562
5 changed files with 32 additions and 43 deletions
+4 -8
View File
@@ -1,27 +1,23 @@
{ top, overlays }:
{ top, nixpkgs }:
let
inherit (top.nixunstable) lib;
mac =
{
system ? "aarch64-darwin",
name,
channel ? top.nixunstable,
hm ? top.hmunstable,
}:
let
nixpkgs = import channel {
inherit system overlays;
};
pkgs = nixpkgs.${system};
in
top.darwin.lib.darwinSystem {
inherit system;
inherit pkgs system;
specialArgs = {
inherit nixpkgs overlays top;
inherit top;
inherit (top) self;
};
modules = [
{
nixpkgs.overlays = overlays;
home-manager = {
extraSpecialArgs = {
inherit top;
+24 -12
View File
@@ -54,34 +54,46 @@
{ self, ... }@top:
let
local_overlay = import ./overlays;
overlays = [
overlays = system: [
top.agenix.overlays.default
local_overlay
top.nixvimunstable.overlays.default
top.proxmox.overlays.${system}
top.nurpkgs.overlays.default
top.vsext.overlays.default
];
metadata = builtins.fromJSON (builtins.readFile ./network.json);
in
top.flake-parts.lib.mkFlake { inputs = top; } {
systems = [
"aarch64-linux"
"x86_64-linux"
"aarch64-darwin"
];
nixpkgs = top.nixunstable.lib.genAttrs systems (
system:
import top.nixunstable {
inherit system;
config = {
allowUnfree = true;
allowUnfreePredicate = _: true;
permittedInsecurePackages = [ "ventoy-1.1.05" ];
};
overlays = overlays system;
}
);
in
top.flake-parts.lib.mkFlake { inputs = top; } {
inherit systems;
flake = {
colmenaHive = top.colmena.lib.makeHive (
{
meta = {
nixpkgs = import top.nixunstable {
inherit overlays;
system = "x86_64-linux";
};
nixpkgs = nixpkgs.x86_64-linux;
specialArgs = {
inherit
metadata
self
top
overlays
;
};
};
@@ -105,11 +117,11 @@
) self.nixosConfigurations)
);
darwinConfigurations = (import ./darwin { inherit top overlays; });
darwinConfigurations = (import ./darwin { inherit top nixpkgs; });
nixosConfigurations = (import ./hosts { inherit top overlays metadata; });
nixosConfigurations = (import ./hosts { inherit top nixpkgs metadata; });
homeConfigurations = (import ./home { inherit top overlays metadata; });
homeConfigurations = (import ./home { inherit top nixpkgs metadata; });
modules = import ./modules;
@@ -125,7 +137,7 @@
}:
{
_module.args = {
pkgs = import top.nixunstable { inherit system overlays; };
pkgs = nixpkgs.${system};
};
packages = (import ./pkgs { inherit pkgs; });
+2 -14
View File
@@ -1,22 +1,10 @@
{
metadata,
overlays,
nixpkgs,
top,
}:
let
pkgs =
system:
(import top.nixunstable {
inherit system;
config = {
allowUnfree = true;
allowUnfreePredicate = _: true;
};
overlays = overlays ++ [
top.nurpkgs.overlays.default
top.vsext.overlays.default
];
});
pkgs = system: nixpkgs.${system};
user =
system: host: username:
top.hmunstable.lib.homeManagerConfiguration {
+2 -3
View File
@@ -1,7 +1,7 @@
{
top,
overlays,
metadata,
nixpkgs,
}:
let
vm = args: (unstable (args // { extraMods = [ top.nixos-generators.nixosModules.all-formats ]; }));
@@ -22,8 +22,7 @@ let
{
nixpkgs = {
inherit system;
overlays =
overlays ++ (channel.lib.optional (system == "x86_64-linux") top.proxmox.overlays.${system});
pkgs = nixpkgs.${system};
};
}
# Imported ones
-6
View File
@@ -79,11 +79,5 @@ in
];
};
};
nixpkgs.config = {
allowUnfree = true;
allowUnfreePredicate = _: true;
permittedInsecurePackages = [ "ventoy-1.1.05" ];
};
};
}