mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-12 01:59:37 +08:00
This reverts commit066ba0c5cf. After further discussion, we want to maintain this as the naming scheme going forward to be similar to standards that have been trying to be implemented in naming configurations and modules. (cherry picked from commit2c87a6475f)
34 lines
1.1 KiB
Nix
34 lines
1.1 KiB
Nix
{ lib, flake-parts-lib, moduleLocation, ... }:
|
|
let inherit (lib) toString mapAttrs mkOption types;
|
|
in {
|
|
options = {
|
|
flake = flake-parts-lib.mkSubmoduleOptions {
|
|
homeConfigurations = mkOption {
|
|
type = types.lazyAttrsOf types.raw;
|
|
default = { };
|
|
description = ''
|
|
Instantiated Home Manager configurations.
|
|
|
|
`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`.
|
|
'';
|
|
};
|
|
homeModules = mkOption {
|
|
type = types.lazyAttrsOf types.deferredModule;
|
|
default = { };
|
|
apply = mapAttrs (k: v: {
|
|
_class = "homeManager";
|
|
_file = "${toString moduleLocation}#homeModules.${k}";
|
|
imports = [ v ];
|
|
});
|
|
description = ''
|
|
Home Manager modules.
|
|
|
|
You may use this for reusable pieces of configuration, service modules, etc.
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
}
|