1
0
Fork 0
mirror of https://github.com/hercules-ci/flake-parts.git synced 2025-04-08 18:14:00 +00:00

add homeManagerModules

This commit is contained in:
Colton Donnelly 2024-04-25 20:44:32 -07:00
parent 9126214d0a
commit 7542b72e55
2 changed files with 28 additions and 0 deletions

View file

@ -6,6 +6,7 @@
./modules/devShells.nix
./modules/flake.nix
./modules/formatter.nix
./modules/homeManagerModules.nix
./modules/legacyPackages.nix
./modules/moduleWithSystem.nix
./modules/nixosConfigurations.nix

View file

@ -0,0 +1,27 @@
{ self, lib, flake-parts-lib, moduleLocation, ... }:
let
inherit (lib)
mapAttrs
mkOption
types
;
inherit (flake-parts-lib)
mkSubmoduleOptions
;
in
{
options = {
flake = mkSubmoduleOptions {
nixosModules = mkOption {
type = types.lazyAttrsOf types.unspecified;
default = { };
apply = mapAttrs (k: v: { _file = "${toString moduleLocation}#nixosModules.${k}"; imports = [ v ]; });
description = ''
home-manager modules.
You may use this for reusable pieces of configuration, service modules, etc for [home-manager](https://github.com/nix-community/home-manager).
'';
};
};
};
}