hosts: set nixpkgs.pkgs

This commit is contained in:
Max Headroom 2024-07-15 23:05:55 +02:00
parent af1cd6e0b6
commit 81e44bf522

View file

@ -1,4 +1,4 @@
{ config, lib, ... }: { config, lib, withSystem, ... }:
let let
inherit (lib) mapAttrs nixosSystem; inherit (lib) mapAttrs nixosSystem;
@ -6,8 +6,12 @@ let
mkNixOS = name: host: nixosSystem { mkNixOS = name: host: nixosSystem {
specialArgs = config.lib.summon name lib.id; specialArgs = config.lib.summon name lib.id;
inherit (host) system; modules = [
modules = [ host.nixos ] ++ config.cluster.config.out.injectNixosConfig name; host.nixos
(withSystem host.system ({ pkgs, ... }: {
nixpkgs = { inherit pkgs; };
}))
] ++ config.cluster.config.out.injectNixosConfig name;
}; };
in { in {
flake.nixosConfigurations = mapAttrs mkNixOS (gods.fromLight // gods.fromFlesh); flake.nixosConfigurations = mapAttrs mkNixOS (gods.fromLight // gods.fromFlesh);