Skip to content

Commit 16adfb4

Browse files
committed
document flake module support
1 parent c18c965 commit 16adfb4

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Instead of `vm.nix`, `nixos-shell` also accepts other modules on the command lin
3131
$ nixos-shell some-nix-module.nix
3232
```
3333

34-
You can also start a vm from a flake's `nixosConfigurations` using the `--flake` flag.
34+
You can also start a vm from a flake's `nixosConfigurations` or `nixosModules` output using the `--flake` flag.
3535

3636
```console
3737
$ nixos-shell --flake github:Mic92/nixos-shell#vm-forward
@@ -52,6 +52,16 @@ This will run the `vm-forward` example.
5252
>}
5353
>```
5454
55+
When using the `--flake` flag, if no attribute is given, `nixos-shell` tries the following flake output attributes:
56+
- `packages.<system>.nixosConfigurations.<vm>`
57+
- `nixosConfigurations.<vm>`
58+
- `nixosModules.<vm>`
59+
60+
If an attribute _name_ is given, `nixos-shell` tries the following flake output attributes:
61+
- `packages.<system>.nixosConfigurations.<name>`
62+
- `nixosConfigurations.<name>`
63+
- `nixosModules.<name>`
64+
5565
## Terminating the virtual machine
5666
5767
Type `Ctrl-a x` to exit the virtual machine.

0 commit comments

Comments
 (0)