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