1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-04-09 18:44:14 +00:00
This commit is contained in:
niacdoial 2025-03-20 03:14:22 -06:00 committed by GitHub
commit eafeef2462
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 2 deletions

View file

@ -277,8 +277,13 @@ in
# We therefore simply log the conflict and otherwise ignore it, mainly
# to make the `files-target-config` test work as expected.
if [[ -e "$realOut/$relTarget" ]]; then
echo "File conflict for file '$relTarget'" >&2
return
if [[ -d "$realOut/$relTarget" && $(realpath "$realOut/$relTarget") == $realOut && $recursive ]]; then
# exception: allow a "collision" for a recureively linked home *directory*
:
else
echo "File conflict for file '$relTarget'" >&2
return
fi
fi
# Figure out the real absolute path to the target.

View file

@ -32,6 +32,13 @@ in {
defaultText = literalExpression "name";
description = ''
Path to target file relative to ${basePathDesc}.
</para><para>
Please note that only a single
<xref linkend="opt-home.file"/> directive
may write to a given target.
In order to link several directories to the same place, you may use
<literal>symlinkJoin</literal> as such:</para><para>
<literal>source = pkgs.symlinkJoin{name="myjoin"; dirs=[ home-package /some/path ]; postBuild="echo custom shell script here";};</literal>
'';
};