vuls: init at 0.27.0
[NixPkgs.git] / nixos / maintainers / scripts / oci / create-image.sh
blob0d7332a0b272061070117efdb2f23a24b3625949
1 #! /usr/bin/env bash
3 set -euo pipefail
5 export NIX_PATH=nixpkgs=$(dirname $(readlink -f $0))/../../../..
6 export NIXOS_CONFIG=$(dirname $(readlink -f $0))/../../../modules/virtualisation/oci-image.nix
8 if (( $# < 1 )); then
10 echo "Usage: create-image.sh <architecture>"
11 echo
12 echo "Where <architecture> is one of:"
13 echo " x86_64-linux"
14 echo " aarch64-linux"
15 ) >&2
18 system="$1"; shift
20 nix-build '<nixpkgs/nixos>' \
21 -A config.system.build.OCIImage \
22 --argstr system "$system" \
23 --option system-features kvm \
24 -o oci-image