mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-11 17:00:22 +00:00
fix(nix): always refresh ssh config snapshot for home-manager
Nix store files have normalized old mtimes, so a -nt check never notices a newer home-manager generation after the first snapshot.
This commit is contained in:
1 parent
b13e545bed
commit
00fdddce05
1 file changed
+4
-4
+4
-4
@@ -41,10 +41,10 @@ let
|
||||
cache="''${XDG_CACHE_HOME:-$HOME/.cache}/netcatty"
|
||||
snap="$cache/ssh_config"
|
||||
mkdir -p "$cache"
|
||||
if [ ! -e "$snap" ] || [ "$config" -nt "$snap" ]; then
|
||||
cp -L "$config" "$snap"
|
||||
chmod 600 "$snap"
|
||||
fi
|
||||
# Always refresh: nix store files have frozen old mtimes, so -nt
|
||||
# never sees a newer home-manager generation after the first copy.
|
||||
cp -L "$config" "$snap"
|
||||
chmod 600 "$snap"
|
||||
exec "$real_ssh" -F "$snap" "$@"
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user