From 5b66b89d6eefd36021b57dcfe420c322a7772ffb Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sun, 4 Nov 2018 21:10:40 +0100 Subject: [PATCH] gtk: use dconf module for settings (cherry picked from commit 4104ff2b6a60cb35dd5713327e73f0a9502fcaa3) --- modules/misc/gtk.nix | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/modules/misc/gtk.nix b/modules/misc/gtk.nix index 930823ff..9f7513d1 100644 --- a/modules/misc/gtk.nix +++ b/modules/misc/gtk.nix @@ -8,8 +8,6 @@ let cfg2 = config.gtk.gtk2; cfg3 = config.gtk.gtk3; - dag = config.lib.dag; - toGtk3Ini = generators.toINI { mkKeyValue = key: value: let @@ -29,16 +27,6 @@ let in "${n} = ${v'}"; - toDconfIni = generators.toINI { - mkKeyValue = key: value: - let - tweakVal = v: - if isString v then "'${v}'" - else toString v; - in - "${key}=${tweakVal value}"; - }; - fontType = types.submodule { options = { package = mkOption { @@ -216,21 +204,8 @@ in xdg.configFile."gtk-3.0/gtk.css".text = cfg3.extraCss; - home.activation = mkIf cfg3.waylandSupport { - gtk3 = dag.entryAfter ["installPackages"] ( - let - iniText = toDconfIni { "/" = dconfIni; }; - iniFile = pkgs.writeText "gtk3.ini" iniText; - dconfPath = "/org/gnome/desktop/interface/"; - in - '' - if [[ -v DRY_RUN ]]; then - echo ${pkgs.gnome3.dconf}/bin/dconf load ${dconfPath} "<" ${iniFile} - else - ${pkgs.gnome3.dconf}/bin/dconf load ${dconfPath} < ${iniFile} - fi - '' - ); + dconf.settings = mkIf cfg3.waylandSupport { + "org/gnome/desktop/interface" = dconfIni; }; } );