all repos — nixfiles @ b5157acb6f8cfc8d5bc7337dac977173e98ec880

System and user configuration, managed by nix and home-manager

Fix error when running home-manager outside of X
Alan Pearce alan@alanpearce.eu
Mon, 06 Jul 2020 12:51:26 +0200
commit

b5157acb6f8cfc8d5bc7337dac977173e98ec880

parent

cbc125670e86c7ce9419b6e84fefeaa5c6ef20b4

1 files changed, 3 insertions(+), 1 deletions(-)

jump to
M user/settings/xresources.nixuser/settings/xresources.nix
@@ -5,7 +5,9 @@ home.file.".xresources" = {     recursive = true;
     source = ../xresources;
     onChange = ''
-      ${pkgs.xorg.xrdb}/bin/xrdb -merge .xresources/main
+      if [[ -n "$DISPLAY" ]]; then
+        ${pkgs.xorg.xrdb}/bin/xrdb -merge .xresources/main
+      fi
     '';
   };
 }