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

Merge pull request #13 from hercules-ci/issue-12-mergeable-nixosConfigurations

Add nixosConfigurations
This commit is contained in:
Robert Hensing 2022-05-17 11:03:10 +02:00 committed by GitHub
commit 2553884888
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 35 additions and 0 deletions

View file

@ -7,6 +7,7 @@
./modules/devShells.nix
./modules/flake.nix
./modules/legacyPackages.nix
./modules/nixosConfigurations.nix
./modules/nixosModules.nix
./modules/overlay.nix
./modules/packages.nix

View file

@ -0,0 +1,34 @@
{ config, lib, flake-modules-core-lib, ... }:
let
inherit (lib)
mkOption
types
literalExpression
;
inherit (flake-modules-core-lib)
mkSubmoduleOptions
;
in
{
options = {
flake = mkSubmoduleOptions {
nixosConfigurations = mkOption {
type = types.lazyAttrsOf types.raw;
default = { };
description = ''
Instantiated NixOS configurations.
'';
example = literalExpression ''
{
my-machine = inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./my-machine/nixos-configuration.nix
];
};
}
'';
};
};
};
}