xdg: fix use of base path

This commit is contained in:
Robert Helgesson 2017-10-31 12:26:39 +01:00
parent 1213578eb7
commit 82d6aa0c97
No known key found for this signature in database
GPG key ID: C3DB11069E65DC86

View file

@ -6,14 +6,14 @@ let
cfg = config.xdg; cfg = config.xdg;
fileType = basePath: (types.loaOf (types.submodule ( fileType = basePathDesc: basePath: (types.loaOf (types.submodule (
{ name, config, ... }: { { name, config, ... }: {
options = { options = {
target = mkOption { target = mkOption {
type = types.str; type = types.str;
apply = p: "${cfg.configHome}/${p}"; apply = p: "${basePath}/${p}";
description = '' description = ''
Path to target file relative to <varname>${basePath}</varname>. Path to target file relative to <varname>${basePathDesc}</varname>.
''; '';
}; };
@ -81,7 +81,7 @@ in
}; };
configFile = mkOption { configFile = mkOption {
type = fileType "xdg.configHome"; type = fileType "xdg.configHome" cfg.configHome;
default = {}; default = {};
description = '' description = ''
Attribute set of files to link into the user's XDG Attribute set of files to link into the user's XDG