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

Add nixosConfigurations

This commit is contained in:
Robert Hensing 2022-05-17 10:56:41 +02:00
parent 688243bcb8
commit e1ea24ed30
2 changed files with 35 additions and 0 deletions

View file

@ -7,6 +7,7 @@
./modules/devShells.nix ./modules/devShells.nix
./modules/flake.nix ./modules/flake.nix
./modules/legacyPackages.nix ./modules/legacyPackages.nix
./modules/nixosConfigurations.nix
./modules/nixosModules.nix ./modules/nixosModules.nix
./modules/overlay.nix ./modules/overlay.nix
./modules/packages.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
];
};
}
'';
};
};
};
}