summaryrefslogtreecommitdiff
path: root/lxc/lxc-import.sh
blob: f4160a474249abc394c525747e9f1e070bb32d11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
set -eu
alias="${1:-nixos-openrc}"

nix build -o result-metadata .#lxc-metadata
nix build -o result .#lxc

if lxc image info "$alias" >/dev/null 2>&1; then
	lxc image delete "$alias"
fi

lxc image import \
	--alias "$alias" \
	result-metadata/tarball/nixos-system-*.tar.xz \
	result/tarball/nixos-system-*.tar.xz