#! @shell@ -e # Allow the location of NixOS sources and the system configuration # file to be overridden. NIXOS=${NIXOS:-/etc/nixos/nixos} NIXPKGS=${NIXPKGS:-/etc/nixos/nixpkgs} NIXOS_CONFIG=${NIXOS_CONFIG:-/etc/nixos/configuration.nix} export NIXPKGS # must be exported so that a non default location is passed to nixos/default.nix showSyntax() { # !!! more or less cut&paste from # system/switch-to-configuration.sh (which we call, of course). cat <&1 | grep -q ' running'; then export NIX_REMOTE=${NIX_REMOTE:-daemon} fi # Pull the manifests defined in the configuration (the "manifests" # attribute). Wonderfully hacky. if test -n "$pullManifest"; then manifests=$(nix-instantiate --eval-only --xml --strict $NIXOS -A manifests \ | grep '&2 <&2 <