From 86bc0e349fcc7ab7a9ac7e6892c6bd6ac12fd1ee Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sun, 16 Oct 2022 17:59:57 +0200 Subject: [PATCH] dconf: handle missing oldGenPath --- modules/misc/dconf.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/misc/dconf.nix b/modules/misc/dconf.nix index d95f8b5e2..ed502ea54 100644 --- a/modules/misc/dconf.nix +++ b/modules/misc/dconf.nix @@ -105,9 +105,11 @@ in { export DCONF_DBUS_RUN_SESSION="${pkgs.dbus}/bin/dbus-run-session" fi - ${cleanup} \ - "$oldGenPath/${statePath}" \ - "$newGenPath/${statePath}" + if [[ -v oldGenPath ]]; then + ${cleanup} \ + "$oldGenPath/${statePath}" \ + "$newGenPath/${statePath}" + fi $DRY_RUN_CMD $DCONF_DBUS_RUN_SESSION ${pkgs.dconf}/bin/dconf load / < ${iniFile}