at 17.09-beta 602 B view raw
1{ config, lib, ... }: 2 3let 4 inherit (lib) mkOption mkIf types mapAttrsToList; 5 cfg = config.programs.dconf; 6 7 mkDconfProfile = name: path: 8 { source = path; target = "dconf/profile/${name}"; }; 9 10in 11{ 12 ###### interface 13 14 options = { 15 programs.dconf = { 16 17 profiles = mkOption { 18 type = types.attrsOf types.path; 19 default = {}; 20 description = "Set of dconf profile files."; 21 internal = true; 22 }; 23 24 }; 25 }; 26 27 ###### implementation 28 29 config = mkIf (cfg.profiles != {}) { 30 environment.etc = 31 (mapAttrsToList mkDconfProfile cfg.profiles); 32 }; 33 34}