diff --git a/nixos/modules/installer/tools/nixos-option.sh b/nixos/modules/installer/tools/nixos-option.sh index 96d09c3a605..a2b963d7661 100644 --- a/nixos/modules/installer/tools/nixos-option.sh +++ b/nixos/modules/installer/tools/nixos-option.sh @@ -76,7 +76,18 @@ evalAttr(){ local prefix="$1" local strict="$2" local suffix="$3" - echo "(import {}).$prefix${option:+.$option}${suffix:+.$suffix}" | evalNix ${strict:+--strict} + evalNix ${strict:+--strict} < {}; + nixpkgs = import {}; + cleanOutput = x: with nixpkgs.lib; + if isDerivation x then x.outPath + else if isFunction x then "" + else x; +in + cleanOutput (reach nixos.$prefix) +EOF } evalOpt(){