1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-24 10:49:48 +01:00

home-manager: pass --refresh to nix (#3624)

This flag is useful to force Nix to re-fetch cached flakes. Without it,
you cannot deploy from a non-local flake in quick succession, since the
caching causes the flake to not be re-fetched.
This commit is contained in:
Bernardo Meurer 2023-02-05 05:14:03 -05:00 committed by GitHub
parent ca69be9335
commit 6d2ba4654d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 2 deletions

View file

@ -179,6 +179,10 @@
--no-out-link
</arg>
<arg>
--refresh
</arg>
<arg>
<group choice="req">
<arg choice="plain">
@ -611,6 +615,18 @@
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--refresh</option>
</term>
<listitem>
<para>
Passed on to <citerefentry>
<refentrytitle>nix-build</refentrytitle>
<manvolnum>1</manvolnum> </citerefentry>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-v</option>

View file

@ -296,7 +296,7 @@ _home-manager_completions ()
"-L" "--print-build-logs" \
"--show-trace" "--substitute" "--builders" "--version" \
"--update-input" "--override-input" "--experimental-features" \
"--extra-experimental-features" )
"--extra-experimental-features" "--refresh")
# ^ « home-manager »'s options.

View file

@ -69,3 +69,4 @@ complete -c home-manager -f -l "update-input"
complete -c home-manager -f -l "override-input"
complete -c home-manager -f -l "experimental-features"
complete -c home-manager -f -l "extra-experimental-features"
complete -c home-manager -f -l "refresh" -d "Consider all previously downloaded files out-of-date"

View file

@ -63,6 +63,7 @@ case "$state" in
'--show-trace[show trace]' \
'--substitute[substitute]' \
'--builders[builders]:SPEC:()' \
'--refresh[refresh]' \
'--override-input[override flake input]:NAME VALUE:()' \
'--update-input[update flake input]:NAME:()' \
'--experimental-features[set experimental Nix features]:VALUE:()' \

View file

@ -556,6 +556,7 @@ function doHelp() {
echo " --no-out-link Do not create a symlink to the output path"
echo " --no-write-lock-file"
echo " --builders VALUE"
echo " --refresh Consider all previously downloaded files out-of-date"
echo
echo "Commands"
echo
@ -628,7 +629,7 @@ while [[ $# -gt 0 ]]; do
FLAKE_ARG="$1"
shift
;;
--recreate-lock-file|--no-update-lock-file|--no-write-lock-file|--no-registries|--commit-lock-file)
--recreate-lock-file|--no-update-lock-file|--no-write-lock-file|--no-registries|--commit-lock-file|--refresh)
PASSTHROUGH_OPTS+=("$opt")
;;
--update-input)