From a977c79f9fc6f32e75ea3d64561f9401213c5563 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sat, 11 Nov 2017 00:30:53 +0100 Subject: [PATCH] xdg: add option 'xdg.dataFile' This allows creating files within the user's XDG data directory. --- modules/misc/xdg.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/misc/xdg.nix b/modules/misc/xdg.nix index 8f47ac5dc..3e7a3bcb5 100644 --- a/modules/misc/xdg.nix +++ b/modules/misc/xdg.nix @@ -52,6 +52,15 @@ in ''; }; + dataFile = mkOption { + type = fileType "xdg.dataHome" cfg.dataHome; + default = {}; + description = '' + Attribute set of files to link into the user's XDG + data home. + ''; + }; + dataHome = mkOption { type = types.path; defaultText = "~/.local/share"; @@ -81,7 +90,7 @@ in }) { - home.file = cfg.configFile; + home.file = mkMerge [ cfg.configFile cfg.dataFile ]; } ]; }