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