xdg mime apps

This commit is contained in:
Miguel Palhas
2024-10-06 19:14:44 +01:00
parent 31bbf3d306
commit 5dc91225b0
4 changed files with 92 additions and 24 deletions
+33
View File
@@ -13,5 +13,38 @@
templates = null;
videos = null;
};
mimeApps = {
enable = true;
defaultApplications = {
# web
"text/html" = "firefox.desktop";
"x-scheme-handler/http" = "firefox.desktop";
"x-scheme-handler/https" = "firefox.desktop";
"x-scheme-handler/avbout" = "firefox.desktop";
"x-scheme-handler/unknown" = "firefox.desktop";
# video
"video/mp4" = "mpv.desktop";
"video/webm" = "mpv.desktop";
"video/x-flv" = "mpv.desktop";
"video/x-matroska" = "mpv.desktop";
"video/x-ms-wmv" = "mpv.desktop";
# images
"image/jpeg" = "imv.desktop";
"image/png" = "imv.desktop";
# pdfs
"application/pdf" = "zathura.pdf";
"application/fdf" = "zathura.pdf";
"application/pdx" = "zathura.pdf";
"application/x-pdf" = "zathura.pdf";
"application/xfdf" = "zathura.pdf";
# files
"inode/directory" = "thunar.desktop";
};
};
};
}
+1
View File
@@ -16,6 +16,7 @@
font-manager
imv
pavucontrol
zathura
# communication
slack
+56 -24
View File
@@ -1,20 +1,63 @@
{ pkgs, inputs, ... }:
{
home.sessionVariables = {
BROWSER = "firefox";
};
programs.firefox = {
enable = true;
package = pkgs.firefox.override {
cfg.enableTridactylNative = true;
};
nativeMessagingHosts.packages = [ pkgs.tridactyl-native ];
policies = {
DefaultDownloadDirectory = "$HOME/downloads/firefox";
DontCheckDefaultBrowser = true;
DisableTelemetry = true;
DisablePocket = true;
DisableFirefoxStudies = true;
DisplayBookmarksToolbar = "never";
DisplayMenuBar = "never";
OverrideFirstRunPage = "";
PromptForDownloadLocation = false;
HardwareAcceleration = true;
TranslateEnabled = true;
Homepage.StartPage = "previous-session";
UserMessaging = {
SkipOnboarding = true;
};
FirefoxSuggest = {
WebSuggestions = false;
SponsoredSuggestions = false;
ImproveSuggest = false;
};
EnableTrackingProtection = {
Value = true;
Cryptomining = true;
Fingerprinting = true;
};
FirefoxHome = {
Search = true;
TopSites = true;
SponsoredTopSites = true;
Highlights = true;
Pocket = false;
SponsoredPocket = false;
Snippets = false;
};
};
profiles = {
personal = {
extensions = with inputs.firefox-addons; [
isDefault = true;
extensions = with inputs.firefox-addons.packages.${pkgs.system}; [
# privacy
# clearurls
clearurls
decentraleyes
# content/ad blocking
@@ -29,7 +72,7 @@
translate-web-pages
# manual use
tridactyl
# tridactyl
bitwarden
];
settings = {
@@ -38,35 +81,24 @@
"media.ffmpeg.vaapi.enabled" = true;
"widget.dmabuf.force-enabled" = true; # Required in recent Firefoxes
# Re-bind ctrl to super (would interfere with tridactyl otherwise)
"ui.key.accelKey" = 91;
"widget.use-xdg-desktop-portal.file-picker" = true;
# Hide the "sharing indicator", it's especially annoying
# with tiling WMs on wayland
"privacy.webrtc.legacyGlobalIndicator" = false;
# Actual settings
"browser.bookmarks.restore_default_bookmarks" = false;
"browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons" = false;
"browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features" = false;
"browser.newtabpage.activity-stream.feeds.snippets" = false;
"browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts.havePinned" = "";
"browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts.searchEngines" = "";
"browser.newtabpage.activity-stream.section.highlights.includePocket" = false;
"browser.newtabpage.activity-stream.showSponsored" = false;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
"browser.aboutConfig.showWarning" = false;
"browser.newtabpage.pinned" = false;
"browser.protections_panel.infoMessage.seen" = true;
"browser.quitShortcut.disabled" = true;
"browser.shell.checkDefaultBrowser" = false;
"browser.toolbars.bookmarks.visibility" = "never";
"browser.urlbar.suggest.openpage" = false;
"datareporting.policy.dataSubmissionEnable" = false;
"datareporting.policy.dataSubmissionPolicyAcceptedVersion" = 2;
"extensions.htmlaboutaddons.recommendations.enabled" = false;
"extensions.pocket.enabled" = false;
"privacy.trackingprotection.enabled" = true;
"privacy.trackingprotection.socialtracking.enabled" = true;
"mousewhell.system_scroll_override" = true;
"extension.autoDisableScopes" = "0";
};
};
};
+2
View File
@@ -24,6 +24,8 @@
ls = "eza";
cat = "bat";
ps = "procs";
open = "xdg-open";
o = "xdg-open";
# cd
".." = "cd ..";