[home-manager] How to refer new files path?

Hi,

How can I refer to the new generation of “built files” path? e.g. my current files path is:

/nix/store/6snh829mk5v48y4avjq4j0045sxp1dzy-home-manager-files/

I need to refer this path in home.nix file, via some kind of variable (which I hope exists).

Rationale: I am fed up with dumb applications’ rewriting my mimeapps.list, so I’ll just arrange some commands (before checkLinkTargets and after writeBoundary) to use mount -o ro,bind, so the symlink itself will be immutable.

Thanks!

That output is built by the config.home-files package, which is an internal option so no stability guarantee is made.

Thanks!

It worked, but I was walking in dangerous places anyway:

innixos ~ ~> home-manager switch
these derivations will be built:
  /nix/store/xcbj5xpf7mz6mcvv3xwwsa5ladam0igw-activation-script.drv
  /nix/store/r6bwb2jvh7284090csy53v9bdqhp4h7z-home-manager-generation.drv
error: linking '/nix/store/xcbj5xpf7mz6mcvv3xwwsa5ladam0igw-activation-script.drv.chroot/nix/store/n5xj84s89fwvfpjbmmf24j3l8hs5n0vx-hm_mi
meapps.list' to '/nix/store/n5xj84s89fwvfpjbmmf24j3l8hs5n0vx-hm_mimeapps.list': Invalid cross-device link

I had to do a manual rollback, I guess I have to settle with find -delete :+1: