aboutsummaryrefslogtreecommitdiff
path: root/tests/config.sh
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2021-02-25 20:35:11 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2021-02-25 21:51:05 +0000
commitca0994819d68aee26a2906c37a47ae609ac46c4c (patch)
treec96805c008c22926b1eaadc340a99323d53be532 /tests/config.sh
parent10e81bf871551901ff0383bdede0f79325e93867 (diff)
parentc189031e8be0530d73a817571ad7f81ad5eedce6 (diff)
Merge remote-tracking branch 'upstream/master' into path-info
Diffstat (limited to 'tests/config.sh')
-rw-r--r--tests/config.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/config.sh b/tests/config.sh
index 8fa349f11..eaa46c395 100644
--- a/tests/config.sh
+++ b/tests/config.sh
@@ -16,3 +16,12 @@ here=$(readlink -f "$(dirname "${BASH_SOURCE[0]}")")
export NIX_USER_CONF_FILES=$here/config/nix-with-substituters.conf
var=$(nix show-config | grep '^substituters =' | cut -d '=' -f 2 | xargs)
[[ $var == https://example.com ]]
+
+# Test that it's possible to load config from the environment
+prev=$(nix show-config | grep '^cores' | cut -d '=' -f 2 | xargs)
+export NIX_CONFIG="cores = 4242"$'\n'"experimental-features = nix-command flakes"
+exp_cores=$(nix show-config | grep '^cores' | cut -d '=' -f 2 | xargs)
+exp_features=$(nix show-config | grep '^experimental-features' | cut -d '=' -f 2 | xargs)
+[[ $prev != $exp_cores ]]
+[[ $exp_cores == "4242" ]]
+[[ $exp_features == "nix-command flakes" ]] \ No newline at end of file