1 { config, lib, pkgs, ... }:
6 cfg = config.programs.dconf;
7 cfgDir = pkgs.symlinkJoin {
8 name = "dconf-system-config";
9 paths = map (x: "${x}/etc/dconf") cfg.packages;
14 concatStringsSep "\n" (
17 ln -s ${path} $out/profile/${name}
22 ${pkgs.dconf}/bin/dconf update $out/db
31 enable = mkEnableOption (lib.mdDoc "dconf");
34 type = types.attrsOf types.path;
36 description = lib.mdDoc "Set of dconf profile files, installed at {file}`/etc/dconf/profiles/«name»`.";
41 type = types.listOf types.package;
43 description = lib.mdDoc "A list of packages which provide dconf profiles and databases in {file}`/etc/dconf`.";
50 config = mkIf (cfg.profiles != {} || cfg.enable) {
51 environment.etc.dconf = mkIf (cfg.profiles != {} || cfg.packages != []) {
55 services.dbus.packages = [ pkgs.dconf ];
57 systemd.packages = [ pkgs.dconf ];
59 # For dconf executable
60 environment.systemPackages = [ pkgs.dconf ];
62 # Needed for unwrapped applications
63 environment.sessionVariables.GIO_EXTRA_MODULES = mkIf cfg.enable [ "${pkgs.dconf.lib}/lib/gio/modules" ];