1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-03-31 04:04:32 +00:00

docs: add docs for mkOutOfStoreSymlink

This commit is contained in:
rafaeloledo 2025-03-18 23:07:51 -03:00
parent 22a36aa709
commit 3e23a79863

View file

@ -59,6 +59,14 @@ in
})
];
# Using this function it is possible to make `home.file` create a
# symlink to a path outside the Nix store. For example, a Home Manager
# configuration containing
#
# `home.file."foo".source = config.lib.file.mkOutOfStoreSymlink ./bar;`
#
# would upon activation create a symlink `~/foo` that points to the
# absolute path of the `bar` file relative the configuration file.
lib.file.mkOutOfStoreSymlink = path:
let
pathStr = toString path;