1
0
Fork 0
mirror of https://github.com/hercules-ci/flake-parts.git synced 2025-03-13 20:28:41 +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, ... }:
(flake-modules-core.lib.evalFlakeModule
{ inherit self; }
{
imports = [
./hello/flake-module.nix
];
systems = [ "x86_64-linux" "aarch64-darwin" ];
perSystem = system: { config, self', inputs', ... }: {
# Per-system attributes can be defined here. The self' and inputs'
# module parameters provide easy access to attributes of the same
# system.
flake-modules-core.lib.mkFlake { inherit self; } {
imports = [
./hello/flake-module.nix
];
systems = [ "x86_64-linux" "aarch64-darwin" ];
perSystem = system: { config, self', inputs', ... }: {
# Per-system attributes can be defined here. The self' and inputs'
# module parameters provide easy access to attributes of the same
# system.
packages.figlet = inputs'.nixpkgs.legacyPackages.figlet;
};
flake = {
# The usual flake attributes can be defined here, including system-
# agnostic ones like nixosModule and system-enumerating ones, although
# those are more easily expressed in perSystem.
packages.figlet = inputs'.nixpkgs.legacyPackages.figlet;
};
flake = {
# The usual flake attributes can be defined here, including system-
# agnostic ones like nixosModule and system-enumerating ones, although
# those are more easily expressed in perSystem.
};
}
).config.flake;
};
};
}