NixOS Containers: Difference between revisions
Flake containers |
m →Tips and tricks: change syntax highlighting language to "console" so that input at the CLI prompt isn't rendered as comments |
||
Line 142: | Line 142: | ||
}; | }; | ||
} | } | ||
</syntaxhighlight>To create and run container enter following commands. In this example the <code>flake.nix</code> file is in the same directory.<syntaxhighlight lang=" | </syntaxhighlight>To create and run container enter following commands. In this example the <code>flake.nix</code> file is in the same directory.<syntaxhighlight lang="console"> | ||
# nixos-container create flake-test --flake . | # nixos-container create flake-test --flake . | ||
host IP is 10.233.4.1, container IP is 10.233.4.2 | host IP is 10.233.4.1, container IP is 10.233.4.2 |