mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 13:13:26 +00:00
gtk: use dconf module for settings
This commit is contained in:
parent
a0162dacf6
commit
4104ff2b6a
1 changed files with 2 additions and 27 deletions
|
@ -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;
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue