Skip to content

Commit

Permalink
Merge pull request #28 from DeterminateSystems/darwin-modules-schema
Browse files Browse the repository at this point in the history
Add `darwinModules` schema
  • Loading branch information
grahamc authored Jul 24, 2024
2 parents 29e53dd + 0ef87c7 commit 11abd30
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ It supports the following flake output types:
* [`overlays`][overlays]
* [`packages`][packages]
* [`darwinConfigurations`][darwin]
* [`darwinModules`][darwin]
* [`homeConfigurations`][home]
* [`dockerImages`][docker]
* `schemas`
Expand Down
15 changes: 15 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,20 @@
})
output);
};

darwinModulesSchema = {
version = 1;
doc = ''
The `darwinModules` flake output defines importable [nix-darwin modules](https://github.com/LnL7/nix-darwin).
'';
inventory = output: self.lib.mkChildren (builtins.mapAttrs
(moduleName: module:
{
what = "nix-darwin module";
evalChecks.isFunctionOrAttrs = checkModule module;
})
output);
};
in

{
Expand Down Expand Up @@ -344,6 +358,7 @@
schemas.nixosModules = nixosModulesSchema;
schemas.homeConfigurations = homeConfigurationsSchema;
schemas.darwinConfigurations = darwinConfigurationsSchema;
schemas.darwinModules = darwinModulesSchema;
schemas.dockerImages = dockerImagesSchema;
};
}

0 comments on commit 11abd30

Please sign in to comment.