aboutsummaryrefslogtreecommitdiffstats
path: root/builds.sr.ht
diff options
context:
space:
mode:
authorFrancesco Gazzetta <fgaz@fgaz.me>2022-08-06 18:37:07 +0200
committerDrew DeVault <sir@cmpwn.com>2022-08-15 12:27:35 +0200
commit258277e89ab37daaf5d1e05fd88a08e8174a73b8 (patch)
treedb787f1968a90c1f0b658890a41c413f92ae9916 /builds.sr.ht
parent5ddf7839dea9573c43695c6fe1cefaec671cf3b3 (diff)
downloadsr.ht-docs-258277e89ab37daaf5d1e05fd88a08e8174a73b8.tar.gz
compatibility.md: nixos: add tip about flakes
Looking at public nixos manifests from builds.sr.ht, many people pass --extra-experimental-features to every nix invocation, which is burdensome. We also got a couple of requests for enabling the experimental "flakes" feature by default, to avoid using the flag. Instead of deviating from the default upstream configuration, we suggest a much cleaner way to set the option globally with a little known environment variable.
Diffstat (limited to 'builds.sr.ht')
-rw-r--r--builds.sr.ht/compatibility.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/builds.sr.ht/compatibility.md b/builds.sr.ht/compatibility.md
index 0c443a6..9dd94f4 100644
--- a/builds.sr.ht/compatibility.md
+++ b/builds.sr.ht/compatibility.md
@@ -860,6 +860,19 @@ However, like in a fresh NixOS installation, there is a root channel named
which is the channel the image was built from.
+**flakes**
+
+Like in a standard Nix(OS) installation, flakes are not enabled by default.
+A good way to use flakes without having to pass `--extra-experimental-features`
+to every `nix` invocation is to use the
+[`NIX_CONFIG`](https://nixos.org/manual/nix/stable/command-ref/env-common.html#env-NIX_CONFIG)
+environment variable instead:
+
+```yaml
+environment:
+ NIX_CONFIG: "experimental-features = nix-command flakes"
+```
+
## OpenBSD
Maintainer: Jarkko Oranen <oranenj@iki.fi>