summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/make-env4
-rw-r--r--scripts/nix_env14
-rwxr-xr-xscripts/nix_infos10
3 files changed, 4 insertions, 24 deletions
diff --git a/scripts/make-env b/scripts/make-env
index 983a3590..25aa869a 100755
--- a/scripts/make-env
+++ b/scripts/make-env
@@ -2,11 +2,11 @@
2 2
3DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 3DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
4 4
5source $DIR/nix_env 5eval "$(make --no-print-directory -C $(dirname $DIR) nix-path)"
6nix-env -r -i -A myEnvironments.immae-eu -f "<nixpkgs>" "$@" 6nix-env -r -i -A myEnvironments.immae-eu -f "<nixpkgs>" "$@"
7result=$? 7result=$?
8 8
9cat >> $(dirname $DIR)/versions_log <<EOF 9cat >> $(dirname $DIR)/versions_log <<EOF
10Ran $(date) with args "$@" and returned "$result" 10Ran $(date) with args "$@" and returned "$result"
11$($DIR/nix_infos | sed -e "s/^/ /") 11$(make --no-print-directory -C $(dirname $DIR) nix-info | sed -e "s/^/ /")
12EOF 12EOF
diff --git a/scripts/nix_env b/scripts/nix_env
index 7bc14dd3..7fb6646d 100644
--- a/scripts/nix_env
+++ b/scripts/nix_env
@@ -1,17 +1,7 @@
1#!/bin/bash 1#!/bin/bash
2 2
3if [ -z "$NIXOPS_DEPLOYMENT" ]; then 3# This will automatically upgrade to latest version at each build
4 # This will automatically upgrade to latest version at each build 4nixpkgs="https://nixos.org/channels/nixos-19.03/nixexprs.tar.xz"
5 nixpkgs="https://nixos.org/channels/nixos-19.03/nixexprs.tar.xz"
6else
7 nixpkgs="https://releases.nixos.org/nixos/19.03/nixos-19.03.172731.3efdf45dbd1/nixexprs.tar.xz"
8fi
9nixpkgsPrevious="$nixpkgs" 5nixpkgsPrevious="$nixpkgs"
10nixpkgsNext="$nixpkgs" 6nixpkgsNext="$nixpkgs"
11export NIX_PATH="nixpkgs=$nixpkgs:nixpkgsNext=$nixpkgsNext:nixpkgsPrevious=$nixpkgsPrevious" 7export NIX_PATH="nixpkgs=$nixpkgs:nixpkgsNext=$nixpkgsNext:nixpkgsPrevious=$nixpkgsPrevious"
12
13nixops_custom () {
14 _DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
15 d=$(nix-build --no-out-link -E "with import <nixpkgs> { overlays = builtins.attrValues (import $(dirname $_DIR)/overlays); }; nixops")
16 ${d}/bin/nixops "$@"
17}
diff --git a/scripts/nix_infos b/scripts/nix_infos
deleted file mode 100755
index 56e5b197..00000000
--- a/scripts/nix_infos
+++ /dev/null
@@ -1,10 +0,0 @@
1#!/bin/bash
2
3DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
4
5source $DIR/nix_env
6version=$(nix eval --raw nixpkgs.lib.version)
7mainversion=$(echo $version | cut -d"." -f -2)
8
9echo "https://releases.nixos.org/nixos/$mainversion/nixos-$version/nixexprs.tar.xz"
10nix eval --raw nixpkgs.bc.meta.position | cut -d"/" -f-4