From 4c0a4740a76ce61b419d51336073764284118aaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sat, 9 Apr 2022 16:23:35 +0200 Subject: WIP --- lxc/lxc-import.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 lxc/lxc-import.sh (limited to 'lxc/lxc-import.sh') diff --git a/lxc/lxc-import.sh b/lxc/lxc-import.sh new file mode 100755 index 0000000..f4160a4 --- /dev/null +++ b/lxc/lxc-import.sh @@ -0,0 +1,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 -- cgit v1.2.3