|
|
||
|---|---|---|
| .. | ||
| config | ||
| modules | ||
| overlays | ||
| pkgs | ||
| flake.nix | ||
| README.md | ||
NixOS Container
Imperative container NixOS configuration.
References:
Setup
In your host configuration, set:
boot.enableContainers = true;
Create a new directory and initialize the template inside of it:
nxcis an arbitrary name
mkdir -p nxc
cd nxc
nix flake init -t git+https://git.sid.ovh/sid/synix#container
Usage
Create the container:
sudo nixos-container create nxc --flake .
Start the container:
sudo nixos-container start nxc
Rebuild the container:
sudo nixos-container update nxc --flake .
Log in as root:
sudo nixos-container root-login nxc
Stop the container:
sudo nixos-container stop nxc
Destroy the container:
sudo nixos-container destroy nxc
For more, see the help page:
nixos-container --help