diff --git a/docs/man-home-manager.xml b/docs/man-home-manager.xml
index cbc977ab..513973e9 100644
--- a/docs/man-home-manager.xml
+++ b/docs/man-home-manager.xml
@@ -155,6 +155,18 @@
--keep-going
+
+
+
+ -L
+
+
+
+ --print-build-logs
+
+
+
+
--show-trace
@@ -546,6 +558,22 @@
+
+
+
+
+
+
+
+
+
+ Passed on to
+ nix build
+
+ when building from a flake.
+
+
+
diff --git a/home-manager/completion.bash b/home-manager/completion.bash
index ec20bbc1..c5512299 100644
--- a/home-manager/completion.bash
+++ b/home-manager/completion.bash
@@ -293,6 +293,7 @@ _home-manager_completions ()
Options=( "-f" "--file" "-b" "-A" "-I" "-h" "--help" "-n" "--dry-run" "-v" \
"--verbose" "--cores" "--debug" "--impure" "--keep-failed" \
"--keep-going" "-j" "--max-jobs" "--no-substitute" "--no-out-link" \
+ "-L" "--print-build-logs" \
"--show-trace" "--substitute" "--builders" "--version" \
"--update-input" "--override-input" "--experimental-features" \
"--extra-experimental-features" )
diff --git a/home-manager/completion.fish b/home-manager/completion.fish
index aca4943f..58ce386e 100644
--- a/home-manager/completion.fish
+++ b/home-manager/completion.fish
@@ -60,6 +60,7 @@ complete -c home-manager -f -l "keep-going" -d "Keep going in case of failed bui
complete -c home-manager -x -s j -l "max-jobs" -d "Max number of build jobs in parallel"
complete -c home-manager -x -l "option" -d "Set Nix configuration option"
complete -c home-manager -x -l "builders" -d "Remote builders"
+complete -c home-manager -f -s L -l "print-build-logs" -d "Print full build logs on standard error"
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"
diff --git a/home-manager/completion.zsh b/home-manager/completion.zsh
index 6e20d17d..3babc1fe 100644
--- a/home-manager/completion.zsh
+++ b/home-manager/completion.zsh
@@ -19,6 +19,7 @@ _arguments \
'(-j --max-jobs)'{--max-jobs,-j}'[max jobs]:NUM:()' \
'--option[option]:NAME VALUE:()' \
'--builders[builders]:SPEC:()' \
+ '(-L --print-build-logs)'{--print-build-logs,-L}'[print build logs]' \
'--show-trace[show trace]' \
'--override-input[override flake input]:NAME VALUE:()' \
'--update-input[update flake input]:NAME:()' \
diff --git a/home-manager/home-manager b/home-manager/home-manager
index 459908f2..86623972 100644
--- a/home-manager/home-manager
+++ b/home-manager/home-manager
@@ -289,6 +289,7 @@ function doBuild() {
"$FLAKE_CONFIG_URI.activationPackage" \
${DRY_RUN+--dry-run} \
${NO_OUT_LINK+--no-link} \
+ ${PRINT_BUILD_LOGS+--print-build-logs} \
|| return
else
doBuildAttr \
@@ -319,6 +320,7 @@ function doSwitch() {
doBuildFlake \
"$FLAKE_CONFIG_URI.activationPackage" \
--out-link "$generation" \
+ ${PRINT_BUILD_LOGS+--print-build-logs} \
&& "$generation/activate" || return
else
doBuildAttr \
@@ -551,6 +553,7 @@ function doHelp() {
echo " --keep-going"
echo " -j, --max-jobs NUM"
echo " --option NAME VALUE"
+ echo " -L, --print-build-logs"
echo " --show-trace"
echo " --(no-)substitute"
echo " --no-out-link Do not create a symlink to the output path"
@@ -648,6 +651,9 @@ while [[ $# -gt 0 ]]; do
--no-out-link)
NO_OUT_LINK=1
;;
+ -L|--print-build-logs)
+ PRINT_BUILD_LOGS=1
+ ;;
-h|--help)
doHelp
exit 0