NixOS Containers: Difference between revisions
m →Tips and tricks: change syntax highlighting language to "console" so that input at the CLI prompt isn't rendered as comments |
m →Tips and tricks: improve grammar |
||
| 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="console"> | </syntaxhighlight>To create and run that 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 | ||