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:
parent
55ee2b46b3
commit
db611fc5ab
1 changed files with 17 additions and 20 deletions
|
@ -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;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue