labs/foundation/flake.nix

40 lines
826 B
Nix
Raw Normal View History

2024-06-05 02:04:40 +00:00
{
description = "A set of foundational packages required for bootstrapping a larger package set.";
inputs = {
lib = {
url = "git+file:../?dir=lib";
};
2024-06-05 02:04:40 +00:00
};
2024-06-22 17:56:18 +00:00
outputs =
inputs:
let
inherit (inputs.lib) lib;
2024-06-05 02:04:40 +00:00
2024-06-22 17:56:18 +00:00
modules = import ./src;
2024-06-05 02:04:40 +00:00
2024-06-13 21:40:41 +00:00
forEachSystem = lib.attrs.generate [
"i686-linux"
"x86_64-linux"
];
2024-06-05 22:16:52 +00:00
in
2024-06-22 17:56:18 +00:00
{
extras =
let
result = lib.modules.run { modules = builtins.attrValues modules; };
in
result.config.exports.resolved.extras;
2024-06-05 22:16:52 +00:00
2024-06-22 17:56:18 +00:00
packages = forEachSystem (
system:
let
result = lib.modules.run {
modules = (builtins.attrValues modules) ++ [ { config.aux.system = system; } ];
};
in
2024-06-05 02:04:40 +00:00
result.config.exports.resolved.packages
2024-06-22 17:56:18 +00:00
);
};
2024-06-05 02:04:40 +00:00
}