diff --git a/modules/xresources.nix b/modules/xresources.nix index 8a7e63216..ef91906e0 100644 --- a/modules/xresources.nix +++ b/modules/xresources.nix @@ -23,7 +23,7 @@ let toString v; in "${n}: ${formatValue v}"; - xrdbMerge = "${pkgs.xorg.xrdb}/bin/xrdb -merge ~/.Xresources"; + xrdbMerge = "${pkgs.xorg.xrdb}/bin/xrdb -merge ${cfg.path}"; in { meta.maintainers = [ maintainers.rycee ]; @@ -75,11 +75,19 @@ in { ~/.Xresources link is produced. ''; }; + + xresources.path = mkOption { + type = types.str; + default = "${config.home.homeDirectory}/.Xresources"; + defaultText = "$HOME/.Xresources"; + description = + "Path where Home Manager should link the .Xresources file."; + }; }; config = mkIf ((cfg.properties != null && cfg.properties != { }) || cfg.extraConfig != "") { - home.file.".Xresources" = { + home.file.${cfg.path} = { text = concatStringsSep "\n" ([ ] ++ optional (cfg.extraConfig != "") cfg.extraConfig ++ optionals (cfg.properties != null)