summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2024-12-01 13:09:15 +0100
committerMartin Fischer <martin@push-f.com>2024-12-11 08:37:52 +0100
commitdfc0d0c704975b05fbd542ddc030508c396fbe03 (patch)
tree695a3754ece752f2d7c16dfb6466ccf0b884e5d7
parenta21e3e713211088874f5bf87762f8dc018eaec67 (diff)
add firefox, pipewire and thunderbird
-rw-r--r--nixos/parts/graphical.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/nixos/parts/graphical.nix b/nixos/parts/graphical.nix
index 7941db6..43d43a6 100644
--- a/nixos/parts/graphical.nix
+++ b/nixos/parts/graphical.nix
@@ -10,4 +10,59 @@
environment.systemPackages = with pkgs; [
i3status-rust
];
+
+ # This generates /etc/xdg/mimeapps.list. The XDG spec and xdg-open don't support wildcards in MIME types.
+ # TODO: use an xdg-open alternative that supports wildcards in MIME types and doesn't use mimeapps.list
+ xdg.mime.defaultApplications =
+ let
+ defaultBrowser = "firefox.desktop";
+ in
+ {
+ "text/html" = defaultBrowser;
+
+ "x-scheme-handler/http" = defaultBrowser;
+ "x-scheme-handler/https" = defaultBrowser;
+ "x-scheme-handler/mailto" = "thunderbird.desktop";
+ };
+
+ services.pipewire = {
+ enable = true;
+ alsa.enable = true;
+ alsa.support32Bit = true;
+ pulse.enable = true;
+ };
+ security.rtkit.enable = true; # recommended for PipeWire
+
+ programs.thunderbird = {
+ enable = true;
+ };
+
+ programs.firefox = {
+ enable = true;
+
+ policies = {
+ DontCheckDefaultBrowser = true;
+ DisablePocket = true;
+ FirefoxHome = {
+ SponsoredTopSites = false;
+ };
+
+ SearchSuggestEnabled = false;
+ # cannot use SearchEngines because it's only available on ESR :(
+ # (https://mozilla.github.io/policy-templates/#searchengines-this-policy-is-only-available-on-the-esr)
+
+ ExtensionSettings = {
+ "uBlock0@raymondhill.net" = {
+ install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
+ installation_mode = "force_installed";
+ };
+ };
+
+ PasswordManagerEnabled = false;
+ ExtensionSettings."{446900e4-71c2-419f-a6a7-df9c091e268b}" = {
+ install_url = "https://addons.mozilla.org/firefox/downloads/latest/bitwarden-password-manager/latest.xpi";
+ installation_mode = "force_installed";
+ };
+ };
+ };
}