refactor: rename modules/flake to flake-parts, hosts to configurations
This commit is contained in:
parent
f78770d4f1
commit
27161d6b13
6 changed files with 0 additions and 0 deletions
28
nix/flake-parts/files.nix
Normal file
28
nix/flake-parts/files.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
inputs,
|
||||
withSystem,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (builtins) map head;
|
||||
inherit (lib) concatStringsSep;
|
||||
mkListEntry = x: "- [" + x.path_ + "](" + x.path_ + ")";
|
||||
listOfGeneratedFiles = withSystem (head config.systems) (psArgs: psArgs.config.files.files);
|
||||
in
|
||||
{
|
||||
imports = [ inputs.files.flakeModules.default ];
|
||||
perSystem = psArgs: {
|
||||
make-shells.default.packages = [ psArgs.config.files.writer.drv ];
|
||||
};
|
||||
text.readme.parts."Generated Files" = concatStringsSep "\n" (
|
||||
[
|
||||
"This flake uses the [files flake-parts module](https://flake.parts/options/files.html) to generate documentation."
|
||||
|
||||
"The list of generated files are:"
|
||||
|
||||
]
|
||||
++ (map mkListEntry listOfGeneratedFiles)
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue