expose packages output, add it to global nixpkgs

Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
ahuston-0 2024-08-12 01:40:30 -04:00
parent 75f56b49e7
commit 7c8767f035
No known key found for this signature in database
GPG Key ID: 1FACF4075E3212F7
3 changed files with 31 additions and 6 deletions

View File

@ -151,6 +151,7 @@
);
inherit (lib.rad-dev.systems) genSystems getImages;
inherit (self) outputs; # for hydra
in
rec {
inherit lib; # for allowing use of custom functions in nix repl
@ -158,13 +159,14 @@
hydraJobs = import ./hydra/jobs.nix { inherit inputs outputs systems; };
formatter = forEachSystem (system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style);
nixosConfigurations = genSystems inputs src (src + "/systems");
nixosConfigurations = genSystems inputs outputs src (src + "/systems");
images = {
install-iso = getImages nixosConfigurations "install-iso";
iso = getImages nixosConfigurations "iso";
qcow = getImages nixosConfigurations "qcow";
};
packages = import ./packages { pkgs = nixpkgs.legacyPackages.x86_64-linux; };
checks = import ./checks.nix { inherit inputs forEachSystem formatter; };
devShells = import ./shell.nix { inherit inputs forEachSystem checks; };
};

View File

@ -149,6 +149,7 @@ rec {
configPath,
hostname,
inputs,
outputs ? { },
src,
users,
home ? true,
@ -160,7 +161,12 @@ rec {
lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs server system;
inherit
inputs
outputs
server
system
;
};
modules =
[
@ -194,7 +200,7 @@ rec {
# type:
# genSystems :: AttrSet -> Path -> Path -> AttrSet
genSystems =
inputs: src: path:
inputs: outputs: src: path:
builtins.listToAttrs (
map (
name:
@ -205,10 +211,15 @@ rec {
inherit name;
value = constructSystem (
{
inherit inputs src configPath;
inherit
inputs
src
configPath
outputs
;
hostname = name;
}
// import configPath { inherit inputs; }
// import configPath { inherit inputs outputs; }
);
}
) (lib.rad-dev.lsdir path)

View File

@ -1,4 +1,9 @@
{ lib, pkgs, ... }:
{
lib,
pkgs,
outputs,
...
}:
{
nix = {
package = pkgs.nixVersions.latest;
@ -50,4 +55,11 @@
dates = [ "01:00" ];
};
};
nixpkgs.overlays = [
(_: _: {
# bring all packages into a namespace called rad-pkgs
rad-pkgs = lib.genAttrs (lib.attrNames outputs.packages) (pkg: outputs.packages.${pkg});
})
];
}