add templates as flake output

This commit is contained in:
ulic-youthlic 2025-05-03 23:23:02 +08:00
parent 385bfedd8f
commit c0d67ed108
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
11 changed files with 168 additions and 0 deletions

16
flake/templates.nix Normal file
View file

@ -0,0 +1,16 @@
{rootPath, ...}: {
flake-parts-lib,
lib,
...
}: {
options = {
flake = flake-parts-lib.mkSubmoduleOptions {
templates = lib.mkOption {
type = lib.types.lazyAttrsOf lib.types.raw;
};
};
};
config = {
flake.templates = import (rootPath + "/templates");
};
}