1
0
Fork 0
mirror of https://github.com/hercules-ci/flake-parts.git synced 2024-12-14 11:47:31 +00:00

Add darwinModules

This commit is contained in:
Robert Hensing 2021-11-22 22:42:40 +01:00
parent e72740311d
commit 6b7705d350
2 changed files with 28 additions and 0 deletions

View file

@ -2,6 +2,7 @@
{
imports = [
./modules/checks.nix
./modules/darwinModules.nix
./modules/devShell.nix
./modules/flake.nix
./modules/legacyPackages.nix

27
modules/darwinModules.nix Normal file
View 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 {
darwinModules = mkOption {
type = types.lazyAttrsOf types.unspecified;
default = { };
apply = mapAttrs (k: v: { _file = "${toString self.outPath}/flake.nix#darwinModules.${k}"; imports = [ v ]; });
description = ''
Nix-darwin modules.
'';
};
};
};
}