41 lines
925 B
Nix
41 lines
925 B
Nix
{
|
|
inputs = {
|
|
nixpkgs = { };
|
|
modularFlake = {
|
|
url = "git+https://git.dzuchun.ing/dzu/modular-flake.git?ref=main";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
naersk = {
|
|
url = "github:nix-community/naersk";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
outputs =
|
|
{
|
|
nixpkgs,
|
|
modularFlake,
|
|
...
|
|
}@flakeInputs:
|
|
let
|
|
flakeModulesDir = ./envs;
|
|
flakeModules = map (name: ./envs/${name}) (
|
|
builtins.filter (nixpkgs.lib.hasSuffix ".nix") (
|
|
builtins.attrNames (builtins.readDir flakeModulesDir)
|
|
)
|
|
);
|
|
in
|
|
modularFlake.lib.mkFlake {
|
|
inherit
|
|
flakeInputs
|
|
;
|
|
systems = [ "x86_64-linux" ];
|
|
modules = flakeModules ++ [ ./lib ];
|
|
outputs = with modularFlake.lib.defaultOutputs; [
|
|
devShells
|
|
checks
|
|
packages
|
|
apps
|
|
./lib/output.nix
|
|
];
|
|
};
|
|
}
|