From 9d9bf6e603a107ba7acc2a178259bfa673afc2df Mon Sep 17 00:00:00 2001 From: Mat Jones Date: Sun, 15 Dec 2024 15:30:11 -0500 Subject: [PATCH] fix(gnome): workaround for monitors.xml issue --- home-manager/modules/gnome/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/home-manager/modules/gnome/default.nix b/home-manager/modules/gnome/default.nix index 43bc2a64..c5ffcb1c 100644 --- a/home-manager/modules/gnome/default.nix +++ b/home-manager/modules/gnome/default.nix @@ -30,8 +30,16 @@ if isLinux then { Categories=Network;InstantMessaging;Chat; ''; } // lib.attrsets.optionalAttrs (!isThinkpad) { - # On desktop, statically configure monitors - "monitors.xml".source = ../../../conf.d/gnome-monitors.xml; + "monitors.xml" = { + # On desktop, statically configure monitors + source = ../../../conf.d/gnome-monitors.xml; + # for whatever reason home-manager has issues with this + # and thinks it will clobber the file, but it's the one + # generating the file; just delete the backup as a workaround + onChange = '' + rm -f /home/mat/.config/monitors.xml.backup /home/mat/.config/monitors.xml~ + ''; + }; }; } else { }