nixos-config/build.sh
Charlotte Van Petegem 7e23a48ed1
Split build and switch
2020-10-05 20:27:55 +02:00

12 lines
346 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
set -x
BUILD_ARGS=()
if [ -d "../nixpkgs" -a -z "${NO_LOCAL:-}" ]
then
BUILD_ARGS+=("--override-input" "nixpkgs" "../nixpkgs" "--no-write-lock-file")
fi
sudo nix build --profile /nix/var/nix/profiles/system ".#nixosConfigurations.$(hostname).config.system.build.toplevel" --no-link "${BUILD_ARGS[@]}"