refactor: rename modules directory to nix

This commit is contained in:
Mohammad Rafiq 2025-07-06 19:11:49 +08:00
parent dd665a2f86
commit 4270e3a304
No known key found for this signature in database
13 changed files with 1 additions and 1 deletions

28
nix/flake-parts/files.nix Normal file
View 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)
);
}