I’m trying to set up agenix’ home-manager module for use with home.file.<name>.<whatever>
, so that I can place my ~/.gradle/gradle.properties
which contains secrets with it. This home-manager module is a bit iffy in that by default its ...path
properties evaluate to $XDG_RUNTIME_DIR/agenix/<name>
by default (see this), which isn’t usable with home.file.<name>.target
because that path isn’t relative to the $HOME
dir, and it’s also not working with home.file.<name>.source
because it’s not an absolute paths.
So, I’ve tried overriding it with absolute paths. I tried ${config.home.homeDirectory}/something
and /run/agenix/${config.home.username}/something
. But in both cases I get something akin to
error: access to absolute path '/run' is forbidden in pure evaluation mode (use '--impure' to override)
That makes me wonder: Are there any absolute paths I am allowed to access in pure evaluation mode? Or is home.file.<name>.source
simply completely unusable with flakes (without downgrading to impure eval mode)?