From 0ba773370faf16ef31a3aee9848a4f77bb263a56 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Thu, 26 Jan 2023 20:33:50 +0100 Subject: [PATCH] doc: improve nixosConfigurations description and example --- modules/nixosConfigurations.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/nixosConfigurations.nix b/modules/nixosConfigurations.nix index 7ddffd2..a52c98e 100644 --- a/modules/nixosConfigurations.nix +++ b/modules/nixosConfigurations.nix @@ -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