flake-parts/home-modules: init

This commit is contained in:
Gabriel Arazas 2024-01-17 17:31:21 +08:00
parent d2993a367b
commit b183caaab8
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC
2 changed files with 23 additions and 0 deletions

View File

@ -8,6 +8,7 @@
imports = [
./images.nix
./deploy-rs-nodes.nix
./home-modules.nix
./setups
];
}

View File

@ -0,0 +1,22 @@
{ lib, flake-parts-lib, moduleLocation, ... }:
{
options = {
flake = flake-parts-lib.mkSubmoduleOptions {
homeModules = lib.mkOption {
type = with lib.types; lazyAttrsOf unspecified;
default = { };
apply = lib.mapAttrs (k: v: {
_file = "${toString moduleLocation}#homeModules.${k}";
imports = [ v ];
});
description = ''
home-manager modules.
You may use this to export reusable pieces of configuration, service
modules, etc.
'';
};
};
};
}