aboutsummaryrefslogtreecommitdiff
path: root/home-manager/modules/misc/dconf.nix
diff options
context:
space:
mode:
authorKaiden Fey <kookie@spacekookie.de>2020-09-21 14:12:32 +0200
committerKatharina Fey <kookie@spacekookie.de>2020-09-21 14:12:32 +0200
commitf80843dd45d7acd563d0a5b014cec3a2ea686fc2 (patch)
tree87189d873d6f932d85f9c1a480462b37d96cd6a5 /home-manager/modules/misc/dconf.nix
parente0800985dab8f8ebb4cebdfd7e361fd1fafdb2a7 (diff)
parent9b1b55ba0264a55add4b7b4e022bdc2832b531f6 (diff)
Merge commit '9b1b55ba0264a55add4b7b4e022bdc2832b531f6'
Diffstat (limited to 'home-manager/modules/misc/dconf.nix')
-rw-r--r--home-manager/modules/misc/dconf.nix25
1 files changed, 5 insertions, 20 deletions
diff --git a/home-manager/modules/misc/dconf.nix b/home-manager/modules/misc/dconf.nix
index f5c9bf71456..5fc7748a76b 100644
--- a/home-manager/modules/misc/dconf.nix
+++ b/home-manager/modules/misc/dconf.nix
@@ -9,22 +9,7 @@ let
toDconfIni = generators.toINI { mkKeyValue = mkIniKeyValue; };
mkIniKeyValue = key: value:
- let
- tweakVal = v:
- if isString v then "'${v}'"
- else if isList v then tweakList v
- else if isBool v then (if v then "true" else "false")
- else toString v;
-
- # Assume empty list is a list of strings, see #769
- tweakList = v:
- if v == [] then "@as []"
- else "[" + concatMapStringsSep "," tweakVal v + "]";
-
- in
- "${key}=${tweakVal value}";
-
- primitive = with types; either bool (either int (either float str));
+ "${key}=${toString (hm.gvariant.mkValue value)}";
in
@@ -43,8 +28,7 @@ in
};
settings = mkOption {
- type = with types;
- attrsOf (attrsOf (either primitive (listOf primitive)));
+ type = with types; attrsOf (attrsOf hm.types.gvariant);
default = {};
example = literalExample ''
{
@@ -53,6 +37,7 @@ in
show-thousands = true;
base = 10;
word-size = 64;
+ window-position = lib.hm.gvariant.mkTuple [100 100];
};
}
'';
@@ -76,9 +61,9 @@ in
fi
if [[ -v DRY_RUN ]]; then
- echo $DCONF_DBUS_RUN_SESSION ${pkgs.gnome3.dconf}/bin/dconf load / "<" ${iniFile}
+ echo $DCONF_DBUS_RUN_SESSION ${pkgs.dconf}/bin/dconf load / "<" ${iniFile}
else
- $DCONF_DBUS_RUN_SESSION ${pkgs.gnome3.dconf}/bin/dconf load / < ${iniFile}
+ $DCONF_DBUS_RUN_SESSION ${pkgs.dconf}/bin/dconf load / < ${iniFile}
fi
unset DCONF_DBUS_RUN_SESSION