Open MithicSpirit opened 1 month ago
N.B.: I would be happy to submit a PR with these changes if they are appropriate, but considering that I am new to Nix, I figured I report it as a bug first.
The path
type simply asserts that the value should be "string like" and start with the letter "/". I would suspect that the issue is that you have put a path literal in your configuration instead of a string. I.e.,
xdg.configHome = /path/to/dir;
instead of
xdg.configHome = "/path/to/dir";
Ah, yeah, I was using ~
. Still, it's weird that the type of these is different from the type of the ones in xdg.userDirs
.
Are you following the right branch?
Is there an existing issue for this?
Issue description
The options
xdg.cacheHome
,xdg.configHome
,xdg.dataHome
, andxdg.stateHome
are all listed astype = types.path
in https://github.com/nix-community/home-manager/blob/master/modules/misc/xdg.nix, but actually using paths for them gives the error that it cannot be resolved in pure mode. I believe that they should havetype = with types; nullOr (coercedTo path toString str);
instead, like in https://github.com/nix-community/home-manager/blob/master/modules/misc/xdg-user-dirs.nix. Notably, the default value for those options is a string I believe, so it would make sense to at least allow that.Maintainer CC
@rycee @oxalica (no maintainers; git blame)
System information