mirror of
https://github.com/hercules-ci/flake-parts.git
synced 2024-12-14 11:47:31 +00:00
Merge pull request #107 from hercules-ci/doc-nixosConfigurations
doc: improve `nixosConfigurations` description and example
This commit is contained in:
commit
8f893daa73
1 changed files with 7 additions and 1 deletions
|
@ -17,11 +17,17 @@ in
|
|||
default = { };
|
||||
description = ''
|
||||
Instantiated NixOS configurations. Used by `nixos-rebuild`.
|
||||
|
||||
`nixosConfigurations` is for specific machines. If you want to expose
|
||||
reusable configurations, add them to [`nixosModules`](#opt-nixosModules)
|
||||
in the form of modules (no `lib.nixosSystem`), so that you can reference
|
||||
them in this or another flake's `nixosConfigurations`.
|
||||
'';
|
||||
example = literalExpression ''
|
||||
{
|
||||
my-machine = inputs.nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
# system is not needed with freshly generated hardware-configuration.nix
|
||||
# system = "x86_64-linux"; # or set nixpkgs.hostPlatform in a module.
|
||||
modules = [
|
||||
./my-machine/nixos-configuration.nix
|
||||
config.nixosModules.my-module
|
||||
|
|
Loading…
Reference in a new issue