Add nixngConfigurations option

Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
Magic_RB 2023-06-13 23:00:56 +02:00
parent 40a264ecd5
commit c51eb2acb0
2 changed files with 31 additions and 0 deletions

View file

@ -39,6 +39,8 @@
outputs = inputs@{ flake-parts, self, ... }:
flake-parts.lib.mkFlake { inherit inputs; } ({ config, ... }: {
imports = [
modules/nixngConfigurations.nix
nixos/systems/omen
nixos/systems/heater
nixos/systems/toothpick

View file

@ -0,0 +1,29 @@
# copied straight from https://github.com/hercules-ci/flake-parts/blob/main/modules/nixosConfigurations.nix
{ lib, flake-parts-lib, ... }:
let
inherit (lib)
mkOption
types
literalExpression
;
inherit (flake-parts-lib)
mkSubmoduleOptions
;
in
{
options = {
flake = mkSubmoduleOptions {
nixngConfigurations = mkOption {
type = types.lazyAttrsOf types.raw;
default = { };
description = ''
Instantiated NixNG configurations.
`nixngConfigurations` is for specific machines. If you want to expose
reusable configurations, add them to [`nixosModules`](#opt-flake.nixosModules)
in the form of modules (no `lib.nixosSystem`), so that you can reference
them in this or another flake's `nixngConfigurations`.
'';
};
};
};
}