From b6b5d8344c251cde40595deb15d3c0cdaf7c56b7 Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Sun, 19 May 2024 13:01:27 +0200 Subject: [PATCH] Move from firefox to librewolf for dialy browsing Fix wrong hostname set --- flake.nix | 3 ++ home-manager/default.nix | 30 +++++++++++++++++++- home-manager/firefox/addons.nix | 32 ++++----------------- home-manager/firefox/default.nix | 45 +----------------------------- home-manager/keepassxc/default.nix | 2 +- nixos/default.nix | 4 +-- switch | 3 -- 7 files changed, 41 insertions(+), 78 deletions(-) delete mode 100755 switch diff --git a/flake.nix b/flake.nix index c3da1a5..09f644f 100644 --- a/flake.nix +++ b/flake.nix @@ -79,6 +79,8 @@ imports = [ nixos-hardware.nixosModules.lenovo-thinkpad-x260 ]; config = { + networking.hostName = "x260"; + fprintd = { enable = true; @@ -98,6 +100,7 @@ imports = [ nixos-hardware.nixosModules.dell-xps-13-9310 ]; config = { + networking.hostName = "xps-9315"; swapDevices = [{ device = "/dev/disk/by-uuid/96a43c35-0174-4e92-81f0-168a5f601f0b"; }]; fileSystems = { "/" = diff --git a/home-manager/default.nix b/home-manager/default.nix index 4ae943c..af8880f 100644 --- a/home-manager/default.nix +++ b/home-manager/default.nix @@ -41,7 +41,6 @@ exfat unstable.qFlipper f3 - unstable.vmware-horizon-client unstable.insomnia unstable.vorta jellyfin-media-player @@ -96,6 +95,31 @@ }; }; }; + + # Currently, it is not possible to have Home Manager manage Liberwolf extensions. + # There is a draft PR which addresses this: + # https://github.com/nix-community/home-manager/pull/3339 + # The extensions I currently use are: + # - ublock-origin (already installed by librewolf) + # - cookie-autodelete + # - clearurls + # - istilldontcareaboutcookies + # - keepassxc-browser + # - redirector + # - violentmonkey + # - boring-rss + # - kagi-search + # - refined-github + librewolf = { + enable = true; + settings = { + "identity.fxaccounts.enabled" = true; + "privacy.clearOnShutdown.history" = false; + "privacy.clearOnShutdown.downloads" = false; + "browser.translations.automaticallyPopup" = false; + "browser.aboutConfig.showWarning" = false; + }; + }; }; # Let home-manager manage the X session @@ -147,5 +171,9 @@ "org/gnome/desktop/sound" = { allow-volume-above-100-percent = true; }; + + "org.gnome.desktop.wm.preferences" = { + auto-raise = true; + }; }; } diff --git a/home-manager/firefox/addons.nix b/home-manager/firefox/addons.nix index 93fcf44..6966e06 100644 --- a/home-manager/firefox/addons.nix +++ b/home-manager/firefox/addons.nix @@ -3,29 +3,9 @@ let rycee-addons = pkgs.nur.repos.rycee.firefox-addons; custom-addons = import ./custom-addons.nix pkgs lib; in -{ - default = lib.concatLists [ - (with rycee-addons; [ - ublock-origin - clearurls - cookie-autodelete - istilldontcareaboutcookies - keepassxc-browser - redirector - ublacklist - umatrix - violentmonkey - boring-rss - kagi-search - refined-github - # rycee.bypass-paywalls-clean - ]) - (with custom-addons; [ http-version-indicator indicatetls sixindicator ]) - ]; - sue = with rycee-addons; [ - ublock-origin - istilldontcareaboutcookies - keepassxc-browser - custom-addons.simple-style-fox-2 - ]; -} +with rycee-addons; [ + ublock-origin + istilldontcareaboutcookies + keepassxc-browser + custom-addons.simple-style-fox-2 +] diff --git a/home-manager/firefox/default.nix b/home-manager/firefox/default.nix index 9574e6d..9659e48 100644 --- a/home-manager/firefox/default.nix +++ b/home-manager/firefox/default.nix @@ -24,52 +24,9 @@ in id = 0; isDefault = true; settings = firefoxSettings; - extensions = firefoxAddons.default; - }; - sue = { - id = 1; - settings = firefoxSettings; - extensions = firefoxAddons.sue; + extensions = firefoxAddons; }; }; }; - - xdg.desktopEntries.firefox-sue = { - categories = [ "Network" "WebBrowser" ]; - exec = "firefox -P sue --name firefox %U"; - genericName = "Web Browser"; - icon = "firefox"; - mimeType = [ - "text/html" - "text/xml" - "application/xhtml+xml" - "application/vnd.mozilla.xul+xml" - "x-scheme-handler/http" - "x-scheme-handler/https" - ]; - name = "Firefox | Sue"; - startupNotify = true; - terminal = false; - type = "Application"; - }; - - xdg.desktopEntries.firefox = lib.mkForce { - categories = [ "Network" "WebBrowser" ]; - exec = "firefox --new-window --name firefox %U"; - genericName = "Web Browser"; - icon = "firefox"; - mimeType = [ - "text/html" - "text/xml" - "application/xhtml+xml" - "application/vnd.mozilla.xul+xml" - "x-scheme-handler/http" - "x-scheme-handler/https" - ]; - name = "Firefox"; - startupNotify = true; - terminal = false; - type = "Application"; - }; }; } diff --git a/home-manager/keepassxc/default.nix b/home-manager/keepassxc/default.nix index 15f4342..f06673f 100644 --- a/home-manager/keepassxc/default.nix +++ b/home-manager/keepassxc/default.nix @@ -1,6 +1,6 @@ { pkgs, config, ... }: { config = { - home.packages = [ pkgs.keepassxc ]; + home.packages = [ pkgs.unstable.keepassxc ]; homeage.file."keepassxc.ini" = { source = ../../secrets/keepassxc.ini.age; symlinks = [ "${config.xdg.configHome}/keepassxc/keepassxc.ini" ]; diff --git a/nixos/default.nix b/nixos/default.nix index a759d28..aeef2a4 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -93,8 +93,6 @@ }; networking = { - hostName = "x260"; - wg-quick.interfaces = { home = { privateKeyFile = config.age.secrets.wg-quick-home-privkey.path; @@ -136,6 +134,6 @@ nixpkgs.config = { permittedInsecurePackages = [ "electron-25.9.0" ]; - allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "vmware-horizon-client" "libfprint-2-tod1-goodix" ]; + allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "vmware-horizon-client" "libfprint-2-tod1-goodix" "vmware-workstation" ]; }; } diff --git a/switch b/switch deleted file mode 100755 index 7d1bd33..0000000 --- a/switch +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -sudo nixos-rebuild switch --flake ./#pim