1
0
Fork 0
mirror of https://github.com/hercules-ci/flake-parts.git synced 2025-03-15 04:58:03 +00:00

templates.multi-module: Use lib.mkFlake

This commit is contained in:
Robert Hensing 2022-05-19 09:51:39 +02:00
parent 55ee2b46b3
commit db611fc5ab

View file

@ -8,26 +8,23 @@
}; };
outputs = { self, flake-modules-core, ... }: outputs = { self, flake-modules-core, ... }:
(flake-modules-core.lib.evalFlakeModule flake-modules-core.lib.mkFlake { inherit self; } {
{ inherit self; } imports = [
{ ./hello/flake-module.nix
imports = [ ];
./hello/flake-module.nix systems = [ "x86_64-linux" "aarch64-darwin" ];
]; perSystem = system: { config, self', inputs', ... }: {
systems = [ "x86_64-linux" "aarch64-darwin" ]; # Per-system attributes can be defined here. The self' and inputs'
perSystem = system: { config, self', inputs', ... }: { # module parameters provide easy access to attributes of the same
# Per-system attributes can be defined here. The self' and inputs' # system.
# module parameters provide easy access to attributes of the same
# system.
packages.figlet = inputs'.nixpkgs.legacyPackages.figlet; packages.figlet = inputs'.nixpkgs.legacyPackages.figlet;
}; };
flake = { flake = {
# The usual flake attributes can be defined here, including system- # The usual flake attributes can be defined here, including system-
# agnostic ones like nixosModule and system-enumerating ones, although # agnostic ones like nixosModule and system-enumerating ones, although
# those are more easily expressed in perSystem. # those are more easily expressed in perSystem.
}; };
} };
).config.flake;
} }