Skip to content
Discussion options

You must be logged in to vote

Maybe I'm not understanding exactly but I think the pkgs.replaceVars function may be useful in this case.

If you have a file b612-in.txt like so:

Here is b612: @b612@

Then you can make Home Manager produce a file ~/b612.txt with @b612@ replaced by the path of pkgs.b612 as follows:

home.file."b612.txt".source = pkgs.replaceVars ./b612-in.txt {
  b612 = pkgs.b612;
};

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@cyrneko
Comment options

Answer selected by cyrneko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants