diff --git a/home/linux/common/shell.nix b/home/linux/common/shell.nix index ef2aa394..3c81ec62 100644 --- a/home/linux/common/shell.nix +++ b/home/linux/common/shell.nix @@ -20,6 +20,7 @@ in rec { # set default applications BROWSER = "firefox"; TERMINAL = "alacritty"; + TERM = "xterm-256color"; # enable scrolling in git diff DELTA_PAGER = "less -R"; diff --git a/home/linux/common/xdg.nix b/home/linux/common/xdg.nix index fd3f36f2..577d595a 100644 --- a/home/linux/common/xdg.nix +++ b/home/linux/common/xdg.nix @@ -5,6 +5,7 @@ {config, pkgs, ...}: { home.packages = with pkgs; [ + xdg-utils # provides cli tools such as `xdg-mime` `xdg-open` xdg-user-dirs ]; @@ -21,7 +22,7 @@ # ls /etc/profiles/per-user/ryan/share/applications/ mimeApps = { enable = true; - associations.added = + defaultApplications = let browser = ["firefox.desktop"]; in diff --git a/modules/nixos/core-desktop.nix b/modules/nixos/core-desktop.nix index 29aac0dd..b3aaf571 100644 --- a/modules/nixos/core-desktop.nix +++ b/modules/nixos/core-desktop.nix @@ -166,9 +166,15 @@ xdg.portal = { enable = true; wlr.enable = true; - xdgOpenUsePortal = true; + # Sets environment variable NIXOS_XDG_OPEN_USE_PORTAL to 1 + # This will make xdg-open use the portal to open programs, + # which resolves bugs involving programs opening inside FHS envs or with unexpected env vars set from wrappers. + # xdg-open is used by almost all programs to open a unknown file/uri + # alacritty as an example, it use xdg-open as default, but you can also custom this behavior + # and vscode has open like `External Uri Openers` + xdgOpenUsePortal = false; extraPortals = with pkgs; [ - xdg-desktop-portal-wlr # for wlroots based compositors + xdg-desktop-portal-wlr # for wlroots based compositors(hyprland/sway) xdg-desktop-portal-gtk # for gtk # xdg-desktop-portal-kde # for kde ];