This repository has been archived on 2024-07-08. You can view files and clone it, but cannot push or open issues or pull requests.
nix-config-tn/nixos/hosts/playground
2024-03-13 22:56:22 +11:00
..
default.nix feat: initial commit 2024-03-13 22:56:22 +11:00
playground.nix feat: initial commit 2024-03-13 22:56:22 +11:00
README.md feat: initial commit 2024-03-13 22:56:22 +11:00

Playground NixOS container

Spin up a TTY only container using systemd nspawn to experiment with configuration.

# Create container from configuration flake
sudo nixos-container create playground \
    --local-address 10.235.1.2 \
    --host-address 10.235.1.1 \
    --flake .#playground

# Update container
sudo nixos-container update playground --flake .#playground

# Start container
sudo nixos-container start playground

# Attach to container TTY
sudo nixos-container login playground

# Stop when done testing
sudo nixos-container stop playground

# Destroy container
sudo nixos-container destroy playground