flake: add `host-pkgs.<host>.<pkg>` output
this builds packages precisely as they are defined by the given host. significant for testing whether a cross-compiled host builds things correctly, for example.
This commit is contained in:
parent
80f3d0472b
commit
e0a6f8ea4a
|
@ -111,6 +111,8 @@
|
|||
# - `nixos-rebuild --flake './#<host>' switch`
|
||||
imgs = builtins.mapAttrs (_: host-dfn: host-dfn.config.system.build.img) self.nixosConfigurations;
|
||||
|
||||
host-pkgs = builtins.mapAttrs (_: host-dfn: host-dfn.config.system.build.pkgs) self.nixosConfigurations;
|
||||
|
||||
overlays = rec {
|
||||
default = pkgs;
|
||||
pkgs = import ./overlays/pkgs.nix;
|
||||
|
|
|
@ -9,6 +9,7 @@ let
|
|||
mapAttrsToList
|
||||
mkDefault
|
||||
mkIf
|
||||
mkMerge
|
||||
mkOption
|
||||
optional
|
||||
optionalAttrs
|
||||
|
@ -122,6 +123,11 @@ in
|
|||
users.users = f.users.users;
|
||||
sane.users = f.sane.users;
|
||||
};
|
||||
in
|
||||
take (sane-lib.mkTypedMerge take configs);
|
||||
in mkMerge [
|
||||
(take (sane-lib.mkTypedMerge take configs))
|
||||
{
|
||||
# expose the pkgs -- as available to the system -- as a build target.
|
||||
system.build.pkgs = pkgs;
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue