You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if `extendModules` is available on the supplied NixOS configuration, in
preference to using `override`.
This permits callers to omit `makeOverridable` when using a
recent-enough nixpkgs.
> Note: system configurations have to be made overridable with `lib.makeOverridable` to use them with `nixos-shell`
42
+
> Note: `nixos-shell` must be able to extend the specified system configuration with [certain modules](share/modules).
43
+
>
44
+
> If your version of `nixpkgs` provides the `extendModules` function on system configurations, `nixos-shell` will use it to inject the required modules; no additional work on your part is needed.
45
+
>
46
+
> If your version of `nixpkgs`**does not** provide `extendModules`, you must make your system configurations overridable with `lib.makeOverridable` to use them with `nixos-shell`:
43
47
>```nix
44
48
>{
45
49
> nixosConfigurations = let
@@ -51,6 +55,7 @@ This will run the `vm-forward` example.
51
55
> };
52
56
>}
53
57
>```
58
+
> Specifying a non-overridable system configuration will cause `nixos-shell` to abort with a non-zero exit status.
54
59
55
60
When using the `--flake` flag, if no attribute is given, `nixos-shell` tries the following flake output attributes:
0 commit comments