diff options
author | worldofpeace <worldofpeace@protonmail.ch> | 2020-04-24 18:22:59 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-24 18:22:59 -0400 |
commit | ee5cba24c31896b6aeb0af4e21b93b878e54f747 (patch) | |
tree | 76fe6763116779df2a530a6b901d41d5f32c60ce /nixos/modules/programs/dconf.nix | |
parent | eeb4e522b5d25408faab02c79a34ead8228531c9 (diff) | |
download | nixpkgs-ee5cba24c31896b6aeb0af4e21b93b878e54f747.tar nixpkgs-ee5cba24c31896b6aeb0af4e21b93b878e54f747.tar.gz nixpkgs-ee5cba24c31896b6aeb0af4e21b93b878e54f747.tar.bz2 nixpkgs-ee5cba24c31896b6aeb0af4e21b93b878e54f747.tar.lz nixpkgs-ee5cba24c31896b6aeb0af4e21b93b878e54f747.tar.xz nixpkgs-ee5cba24c31896b6aeb0af4e21b93b878e54f747.tar.zst nixpkgs-ee5cba24c31896b6aeb0af4e21b93b878e54f747.zip |
Revert "ibus: fix dconf db installation"
Diffstat (limited to 'nixos/modules/programs/dconf.nix')
-rw-r--r-- | nixos/modules/programs/dconf.nix | 35 |
1 files changed, 10 insertions, 25 deletions
diff --git a/nixos/modules/programs/dconf.nix b/nixos/modules/programs/dconf.nix index 30fbd72a9ab..6702e8efd1c 100644 --- a/nixos/modules/programs/dconf.nix +++ b/nixos/modules/programs/dconf.nix @@ -4,24 +4,13 @@ with lib; let cfg = config.programs.dconf; - cfgDir = pkgs.symlinkJoin { - name = "dconf-system-config"; - paths = map (x: "${x}/etc/dconf") cfg.packages; - postBuild = '' - mkdir -p $out/profile - mkdir -p $out/db - '' + ( - concatStringsSep "\n" ( - mapAttrsToList ( - name: path: '' - ln -s ${path} $out/profile/${name} - '' - ) cfg.profiles - ) - ) + '' - ${pkgs.dconf}/bin/dconf update $out/db - ''; - }; + + mkDconfProfile = name: path: + { + name = "dconf/profile/${name}"; + value.source = path; + }; + in { ###### interface @@ -33,22 +22,18 @@ in profiles = mkOption { type = types.attrsOf types.path; default = {}; - description = "Set of dconf profile files, installed at <filename>/etc/dconf/profiles/<replaceable>name</replaceable></filename>."; + description = "Set of dconf profile files."; internal = true; }; - packages = mkOption { - type = types.listOf types.package; - default = []; - description = "A list of packages which provide dconf profiles and databases in <filename>/etc/dconf</filename>."; - }; }; }; ###### implementation config = mkIf (cfg.profiles != {} || cfg.enable) { - environment.etc.dconf.source = mkIf (cfg.profiles != {} || cfg.packages != []) cfgDir; + environment.etc = optionalAttrs (cfg.profiles != {}) + (mapAttrs' mkDconfProfile cfg.profiles); services.dbus.packages = [ pkgs.dconf ]; |