Simplify nixpkgs eval

This commit is contained in:
Greg Hellings
2025-12-16 09:07:55 -06:00
parent c77c4a8ff6
commit 1a528f10de
10 changed files with 25 additions and 155 deletions
+11 -18
View File
@@ -1,35 +1,28 @@
{ top, ... }@all:
{ top, overlays }:
let
vm = args: (unstable (args // { extraMods = [ top.nixos-generators.nixosModules.all-formats ]; }));
wsl = args: (unstable (args // { extraMods = [ top.wsl.nixosModules.wsl ]; }));
unstable =
args:
(machine (
args
// {
channel = top.nixunstable;
hm = top.hmunstable;
}
));
machine =
{
channel ? top.nixstable,
channel ? top.nixunstable,
extraMods ? [ ],
name,
system ? "x86_64-linux",
hm ? top.hm,
hm ? top.hmunstable,
}:
let
nixpkgs = import channel { inherit system; };
overlays = all.overlays;
in
channel.lib.nixosSystem {
inherit system;
specialArgs = {
inherit nixpkgs top overlays;
inherit top;
inherit (top) self;
};
modules = [
{
nixpkgs = {
inherit system;
overlays =
overlays ++ (channel.lib.optional (system == "x86_64-linux") top.proxmox.overlays.${system});
};
}
# Imported ones
top.agenix.nixosModules.default
hm.nixosModules.home-manager