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 let
inherit (top.nixunstable) lib; inherit (top.nixunstable) lib;
mac = mac =
{ {
system ? "aarch64-darwin", system ? "aarch64-darwin",
name, name,
channel ? top.nixunstable,
hm ? top.hmunstable, hm ? top.hmunstable,
}: }:
let let
nixpkgs = import channel { pkgs = nixpkgs.${system};
inherit system overlays;
};
in in
top.darwin.lib.darwinSystem { top.darwin.lib.darwinSystem {
inherit system; inherit pkgs system;
specialArgs = { specialArgs = {
inherit nixpkgs overlays top; inherit top;
inherit (top) self; inherit (top) self;
}; };
modules = [ modules = [
{ {
nixpkgs.overlays = overlays;
home-manager = { home-manager = {
extraSpecialArgs = { extraSpecialArgs = {
inherit top; inherit top;
+24 -12
View File
@@ -54,34 +54,46 @@
{ self, ... }@top: { self, ... }@top:
let let
local_overlay = import ./overlays; local_overlay = import ./overlays;
overlays = [ overlays = system: [
top.agenix.overlays.default top.agenix.overlays.default
local_overlay local_overlay
top.nixvimunstable.overlays.default top.nixvimunstable.overlays.default
top.proxmox.overlays.${system}
top.nurpkgs.overlays.default
top.vsext.overlays.default
]; ];
metadata = builtins.fromJSON (builtins.readFile ./network.json); metadata = builtins.fromJSON (builtins.readFile ./network.json);
in
top.flake-parts.lib.mkFlake { inputs = top; } {
systems = [ systems = [
"aarch64-linux" "aarch64-linux"
"x86_64-linux" "x86_64-linux"
"aarch64-darwin" "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 = { flake = {
colmenaHive = top.colmena.lib.makeHive ( colmenaHive = top.colmena.lib.makeHive (
{ {
meta = { meta = {
nixpkgs = import top.nixunstable { nixpkgs = nixpkgs.x86_64-linux;
inherit overlays;
system = "x86_64-linux";
};
specialArgs = { specialArgs = {
inherit inherit
metadata metadata
self self
top top
overlays
; ;
}; };
}; };
@@ -105,11 +117,11 @@
) self.nixosConfigurations) ) 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; modules = import ./modules;
@@ -125,7 +137,7 @@
}: }:
{ {
_module.args = { _module.args = {
pkgs = import top.nixunstable { inherit system overlays; }; pkgs = nixpkgs.${system};
}; };
packages = (import ./pkgs { inherit pkgs; }); packages = (import ./pkgs { inherit pkgs; });
+2 -14
View File
@@ -1,22 +1,10 @@
{ {
metadata, metadata,
overlays, nixpkgs,
top, top,
}: }:
let let
pkgs = pkgs = system: nixpkgs.${system};
system:
(import top.nixunstable {
inherit system;
config = {
allowUnfree = true;
allowUnfreePredicate = _: true;
};
overlays = overlays ++ [
top.nurpkgs.overlays.default
top.vsext.overlays.default
];
});
user = user =
system: host: username: system: host: username:
top.hmunstable.lib.homeManagerConfiguration { top.hmunstable.lib.homeManagerConfiguration {
+2 -3
View File
@@ -1,7 +1,7 @@
{ {
top, top,
overlays,
metadata, metadata,
nixpkgs,
}: }:
let let
vm = args: (unstable (args // { extraMods = [ top.nixos-generators.nixosModules.all-formats ]; })); vm = args: (unstable (args // { extraMods = [ top.nixos-generators.nixosModules.all-formats ]; }));
@@ -22,8 +22,7 @@ let
{ {
nixpkgs = { nixpkgs = {
inherit system; inherit system;
overlays = pkgs = nixpkgs.${system};
overlays ++ (channel.lib.optional (system == "x86_64-linux") top.proxmox.overlays.${system});
}; };
} }
# Imported ones # Imported ones
-6
View File
@@ -79,11 +79,5 @@ in
]; ];
}; };
}; };
nixpkgs.config = {
allowUnfree = true;
allowUnfreePredicate = _: true;
permittedInsecurePackages = [ "ventoy-1.1.05" ];
};
}; };
} }