mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-14 16:42:43 +02:00
fix: try to make firefox the default browser
This commit is contained in:
@@ -20,6 +20,7 @@ in rec {
|
|||||||
# set default applications
|
# set default applications
|
||||||
BROWSER = "firefox";
|
BROWSER = "firefox";
|
||||||
TERMINAL = "alacritty";
|
TERMINAL = "alacritty";
|
||||||
|
TERM = "xterm-256color";
|
||||||
|
|
||||||
# enable scrolling in git diff
|
# enable scrolling in git diff
|
||||||
DELTA_PAGER = "less -R";
|
DELTA_PAGER = "less -R";
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
{config, pkgs, ...}:
|
{config, pkgs, ...}:
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
xdg-utils # provides cli tools such as `xdg-mime` `xdg-open`
|
||||||
xdg-user-dirs
|
xdg-user-dirs
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -21,7 +22,7 @@
|
|||||||
# ls /etc/profiles/per-user/ryan/share/applications/
|
# ls /etc/profiles/per-user/ryan/share/applications/
|
||||||
mimeApps = {
|
mimeApps = {
|
||||||
enable = true;
|
enable = true;
|
||||||
associations.added =
|
defaultApplications =
|
||||||
let
|
let
|
||||||
browser = ["firefox.desktop"];
|
browser = ["firefox.desktop"];
|
||||||
in
|
in
|
||||||
|
|||||||
@@ -166,9 +166,15 @@
|
|||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
enable = true;
|
enable = true;
|
||||||
wlr.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; [
|
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-gtk # for gtk
|
||||||
# xdg-desktop-portal-kde # for kde
|
# xdg-desktop-portal-kde # for kde
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user