initial commit
All checks were successful
Deploy docs / build-and-deploy (push) Successful in 3s

This commit is contained in:
sid 2026-02-23 20:34:35 +01:00
commit 95a533c876
451 changed files with 18255 additions and 0 deletions

View file

@ -0,0 +1,70 @@
# NixOS Container
Imperative container NixOS configuration.
## References:
- [NixOS Manual](https://nixos.org/manual/nixos/stable/#sec-imperative-containers)
- [NixOS Wiki](https://wiki.nixos.org/wiki/NixOS_Containers#Define_and_create_nixos-container_from_a_Flake_file)
## Setup
In your host configuration, set:
```nix
boot.enableContainers = true;
```
Create a new directory and initialize the template inside of it:
> `nxc` is an arbitrary name
```bash
mkdir -p nxc
cd nxc
nix flake init -t git+https://git.sid.ovh/sid/synix#container
```
## Usage
Create the container:
```bash
sudo nixos-container create nxc --flake .
```
Start the container:
```bash
sudo nixos-container start nxc
```
Rebuild the container:
```bash
sudo nixos-container update nxc --flake .
```
Log in as root:
```bash
sudo nixos-container root-login nxc
```
Stop the container:
```bash
sudo nixos-container stop nxc
```
Destroy the container:
```bash
sudo nixos-container destroy nxc
```
For more, see the help page:
```bash
nixos-container --help
```