2022-05-25 14:36:33 +00:00
|
|
|
{ config, lib, flake-parts-lib, ... }:
|
2022-05-17 08:56:41 +00:00
|
|
|
let
|
|
|
|
inherit (lib)
|
|
|
|
mkOption
|
|
|
|
types
|
|
|
|
literalExpression
|
|
|
|
;
|
2022-05-25 14:36:33 +00:00
|
|
|
inherit (flake-parts-lib)
|
2022-05-17 08:56:41 +00:00
|
|
|
mkSubmoduleOptions
|
|
|
|
;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
flake = mkSubmoduleOptions {
|
|
|
|
nixosConfigurations = mkOption {
|
|
|
|
type = types.lazyAttrsOf types.raw;
|
|
|
|
default = { };
|
2022-11-11 06:39:25 +00:00
|
|
|
description = ''
|
2022-11-11 05:40:37 +00:00
|
|
|
Instantiated NixOS configurations. Used by `nixos-rebuild`.
|
2022-05-17 08:56:41 +00:00
|
|
|
'';
|
|
|
|
example = literalExpression ''
|
|
|
|
{
|
|
|
|
my-machine = inputs.nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
./my-machine/nixos-configuration.nix
|
2022-11-11 05:40:37 +00:00
|
|
|
config.nixosModules.my-module
|
2022-05-17 08:56:41 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|