diff --git a/doc/man-home-manager.xml b/doc/man-home-manager.xml index 357f4d5e8..9b5224243 100644 --- a/doc/man-home-manager.xml +++ b/doc/man-home-manager.xml @@ -155,6 +155,10 @@ --(no-)substitute + + --no-out-link + + @@ -536,6 +540,19 @@ + + + + + + + Passed on to + nix-build + 1 + when running home-manager build. + + + diff --git a/home-manager/completion.bash b/home-manager/completion.bash index 9a470cc2c..2ff7ff9e7 100644 --- a/home-manager/completion.bash +++ b/home-manager/completion.bash @@ -291,7 +291,8 @@ _home-manager_completions () local Options Options=( "-f" "--file" "-b" "-A" "-I" "-h" "--help" "-n" "--dry-run" "-v" "--verbose" \ - "--cores" "--debug" "--keep-failed" "--keep-going" "-j" "--max-jobs" "--no-substitute" "--show-trace" "--substitute") + "--cores" "--debug" "--keep-failed" "--keep-going" "-j" "--max-jobs" \ + "--no-substitute" "--no-out-link" "--show-trace" "--substitute") # ^ « home-manager »'s options. diff --git a/home-manager/completion.fish b/home-manager/completion.fish index 011a2b3ef..2ca964bec 100644 --- a/home-manager/completion.fish +++ b/home-manager/completion.fish @@ -60,3 +60,4 @@ complete -c home-manager -x -l "option" -d "Set Nix configuration option" complete -c home-manager -f -l "show-trace" -d "Print stack trace of evaluation errors" complete -c home-manager -f -l "substitute" complete -c home-manager -f -l "no-substitute" +complete -c home-manager -f -l "no-out-link" diff --git a/home-manager/completion.zsh b/home-manager/completion.zsh index 9d346851b..a722adff5 100644 --- a/home-manager/completion.zsh +++ b/home-manager/completion.zsh @@ -48,6 +48,7 @@ case "$state" in '--keep-failed[keep failed]' \ '--keep-going[keep going]' \ '--max-jobs[max jobs]:NUM:()' \ + '--no-out-link[no out link]' \ '--no-substitute[no substitute]' \ '--option[option]:NAME VALUE:()' \ '--show-trace[show trace]' \ diff --git a/home-manager/home-manager b/home-manager/home-manager index de521242e..9b06ad38f 100644 --- a/home-manager/home-manager +++ b/home-manager/home-manager @@ -252,6 +252,7 @@ function doBuild() { nix build \ "${PASSTHROUGH_OPTS[@]}" \ ${DRY_RUN+--dry-run} \ + ${NO_OUT_LINK+--no-out-link} \ "$FLAKE_CONFIG_URI.activationPackage" \ || exitCode=1 return $exitCode @@ -263,8 +264,9 @@ function doBuild() { newsInfo=$(buildNews) local exitCode - - doBuildAttr --attr activationPackage \ + doBuildAttr \ + ${NO_OUT_LINK+--no-out-link} \ + --attr activationPackage \ && exitCode=0 || exitCode=1 presentNews "$newsInfo" @@ -520,6 +522,7 @@ function doHelp() { echo " --option NAME VALUE" echo " --show-trace" echo " --(no-)substitute" + echo " --no-out-link Do not create a symlink to the output path" echo echo "Commands" echo @@ -601,6 +604,9 @@ while [[ $# -gt 0 ]]; do PASSTHROUGH_OPTS+=("$opt" "$1" "$2") shift 2 ;; + --no-out-link) + NO_OUT_LINK=1 + ;; -h|--help) doHelp exit 0 @@ -695,3 +701,5 @@ case $COMMAND in exit 1 ;; esac + +# vim: ft=bash