#! @shell@ -e # Allow the location of NixOS sources and the system configuration # file to be overridden. NIXOS=${NIXOS:-@defaultNIXOS@} NIXPKGS=${NIXPKGS:-@defaultNIXPKGS@} 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 "${NIXOS_PULL:-1}" != 0; then manifests=$(nix-instantiate --eval-only --xml --strict $NIXOS -A manifests \ | grep '&2 <