From b299665744731644820e4c913fa085d1405ae4d2 Mon Sep 17 00:00:00 2001 From: edef Date: Tue, 5 Nov 2019 14:12:59 +0000 Subject: modules/xdg: don't generate empty xdg dirs --- modules/xdg/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/xdg') diff --git a/modules/xdg/default.nix b/modules/xdg/default.nix index fc552883fb16..a0417f65859a 100644 --- a/modules/xdg/default.nix +++ b/modules/xdg/default.nix @@ -1,7 +1,7 @@ { lib, pkgs, config, ... }: let - inherit (lib) mapAttrsToList mkOption; + inherit (lib) filterAttrs mapAttrsToList mkOption; inherit (lib.types) loaOf attrsOf path submodule; inherit (pkgs) linkFarm; @@ -29,7 +29,8 @@ in (mapAttrsToList (name: path: { inherit name path; }) xdg.config.paths); - }) config.users.users); + }) (filterAttrs (_: { xdg, ... }: xdg.config.paths != {}) + config.users.users)); environment.extraInit = '' etc_xdg_config_home=/run/current-system/etc/xdg/nixos/per-user/$USER -- cgit 1.4.1