blob: 6326243b6bb694a7b2505b663f67f0aef8b5f481 (
plain) (
tree)
|
|
#!/bin/bash
if [ -z "$NIXOPS_DEPLOYMENT" ]; then
# This will automatically upgrade to latest version at each build
nixpkgs="https://nixos.org/channels/nixos-19.03/nixexprs.tar.xz"
else
nixpkgs="https://releases.nixos.org/nixos/19.03/nixos-19.03.172530.096e2f137b6/nixexprs.tar.xz"
fi
nixpkgsPrevious="$nixpkgs"
nixpkgsNext="$nixpkgs"
export NIX_PATH="nixpkgs=$nixpkgs:nixpkgsNext=$nixpkgsNext:nixpkgsPrevious=$nixpkgsPrevious"
nixops_custom () {
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
d=$(nix-build --no-out-link -E "with import <nixpkgs> { overlays = builtins.attrValues (import $(dirname $DIR)/overlays); }; nixops")
${d}/bin/nixops "$@"
}
|