mirror of
https://github.com/hercules-ci/flake-parts.git
synced 2024-12-14 11:47:31 +00:00
Add nixosModules
This commit is contained in:
parent
6b7705d350
commit
e5d5866b1d
2 changed files with 28 additions and 0 deletions
|
@ -6,6 +6,7 @@
|
|||
./modules/devShell.nix
|
||||
./modules/flake.nix
|
||||
./modules/legacyPackages.nix
|
||||
./modules/nixosModules.nix
|
||||
./modules/packages.nix
|
||||
./modules/perSystem.nix
|
||||
];
|
||||
|
|
27
modules/nixosModules.nix
Normal file
27
modules/nixosModules.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ config, self, lib, flake-modules-core-lib, ... }:
|
||||
let
|
||||
inherit (lib)
|
||||
filterAttrs
|
||||
mapAttrs
|
||||
mkOption
|
||||
optionalAttrs
|
||||
types
|
||||
;
|
||||
inherit (flake-modules-core-lib)
|
||||
mkSubmoduleOptions
|
||||
;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
flake = mkSubmoduleOptions {
|
||||
nixosModules = mkOption {
|
||||
type = types.lazyAttrsOf types.unspecified;
|
||||
default = { };
|
||||
apply = mapAttrs (k: v: { _file = "${toString self.outPath}/flake.nix#nixosModules.${k}"; imports = [ v ]; });
|
||||
description = ''
|
||||
NixOS modules.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue