2025-01-30 18:17:53 +00:00
|
|
|
{ lib, flake-parts-lib, moduleLocation, ... }:
|
|
|
|
let inherit (lib) toString mapAttrs mkOption types;
|
|
|
|
in {
|
|
|
|
options = {
|
|
|
|
flake = flake-parts-lib.mkSubmoduleOptions {
|
|
|
|
homeConfigurations = mkOption {
|
2025-02-11 00:07:00 +00:00
|
|
|
type = types.lazyAttrsOf types.deferredModule;
|
2025-01-30 18:17:53 +00:00
|
|
|
default = { };
|
|
|
|
description = ''
|
2025-01-30 23:22:29 +01:00
|
|
|
Instantiated Home Manager configurations.
|
2025-01-30 18:17:53 +00:00
|
|
|
|
|
|
|
`homeConfigurations` is for specific installations. If you want to expose
|
|
|
|
reusable configurations, add them to `homeModules` in the form of modules, so
|
|
|
|
that you can reference them in this or another flake's `homeConfigurations`.
|
|
|
|
'';
|
|
|
|
};
|
2025-02-03 16:19:46 -03:00
|
|
|
homeManagerModules = mkOption {
|
2025-01-30 18:17:53 +00:00
|
|
|
type = types.lazyAttrsOf types.unspecified;
|
|
|
|
default = { };
|
|
|
|
apply = mapAttrs (k: v: {
|
2025-02-16 19:57:15 +00:00
|
|
|
_class = "homeManager";
|
2025-02-03 16:19:46 -03:00
|
|
|
_file = "${toString moduleLocation}#homeManagerModules.${k}";
|
2025-01-30 18:17:53 +00:00
|
|
|
imports = [ v ];
|
|
|
|
});
|
|
|
|
description = ''
|
2025-01-30 23:22:29 +01:00
|
|
|
Home Manager modules.
|
2025-01-30 18:17:53 +00:00
|
|
|
|
|
|
|
You may use this for reusable pieces of configuration, service modules, etc.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|