From 23a9f9127c3975fd3c25869c55a6014ee2aefaeb Mon Sep 17 00:00:00 2001 From: Shamrock Lee <44064051+ShamrockLee@users.noreply.github.com> Date: Sat, 12 Feb 2022 18:50:51 +0000 Subject: [PATCH] home-manager: add more pass-through options Specifically, pass through --[extra-]experimental-features to Nix. --- docs/nix-flakes.adoc | 7 +++++-- home-manager/home-manager | 8 ++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/nix-flakes.adoc b/docs/nix-flakes.adoc index 609eac18e..c3bfabe0d 100644 --- a/docs/nix-flakes.adoc +++ b/docs/nix-flakes.adoc @@ -18,10 +18,13 @@ Either set in `nix.conf` [source,bash] experimental-features = nix-command flakes + -or pass them to `nix` by +or pass them to `nix` and `home-manager` by + [source,console] -nix --experimental-features "nix-command flakes" your command +---- +$ nix --extra-experimental-features "nix-command flakes" +$ home-manager --extra-experimental-features "nix-command flakes" +---- * Prepare your Home Manager configuration (`home.nix`). + diff --git a/home-manager/home-manager b/home-manager/home-manager index 8bc58f85c..43c924420 100644 --- a/home-manager/home-manager +++ b/home-manager/home-manager @@ -608,6 +608,14 @@ while [[ $# -gt 0 ]]; do PASSTHROUGH_OPTS+=("$opt" "$1" "$2") shift 2 ;; + --experimental-features) + PASSTHROUGH_OPTS+=("$opt" "$1") + shift + ;; + --extra-experimental-features) + PASSTHROUGH_OPTS+=("$opt" "$1") + shift + ;; --no-out-link) NO_OUT_LINK=1 ;;