From 40e9f3bf4ecf05fb871783c17ec2f30d4e10bd56 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Sun, 26 Jan 2025 18:15:13 +0300 Subject: [PATCH] Firefox: Enable policy for Foxyproxy 8.10. --- config/Live.nix | 2 +- home/file/dconf/Gtk.nix | 8 +-- home/file/dconf/Nautilus.nix | 2 +- home/file/keyd/module/Firefox.nix | 2 +- home/file/waybar/default.nix | 1 - home/program/firefox/default.nix | 97 +++++++++++++--------------- home/program/thunderbird/default.nix | 38 ----------- overlay/Tmux.nix | 2 +- 8 files changed, 54 insertions(+), 98 deletions(-) diff --git a/config/Live.nix b/config/Live.nix index 20ea1cc..e505252 100644 --- a/config/Live.nix +++ b/config/Live.nix @@ -3,7 +3,7 @@ let cfg = config.module.live; in { - # ISSUE: Can't find a way to import this conditionally. + # TODO: Can't find a way to import this conditionally. # imports = [ "${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/iso-image.nix" ]; config = lib.mkIf cfg.enable { diff --git a/home/file/dconf/Gtk.nix b/home/file/dconf/Gtk.nix index 9afa88a..782557c 100644 --- a/home/file/dconf/Gtk.nix +++ b/home/file/dconf/Gtk.nix @@ -7,9 +7,9 @@ show-size-column = true; show-type-column = true; sidebar-width = "166"; - sort-column = "modified"; + sort-column = "name"; sort-directories-first = true; - sort-order = "descending"; + sort-order = "ascending"; type-format = "category"; view-type = "list"; }; @@ -20,9 +20,9 @@ show-hidden = false; show-size-column = true; show-type-column = true; - sort-column = "modified"; + sort-column = "name"; sort-directories-first = true; - sort-order = "descending"; + sort-order = "ascending"; type-format = "category"; }; } diff --git a/home/file/dconf/Nautilus.nix b/home/file/dconf/Nautilus.nix index 253a8aa..15ee353 100644 --- a/home/file/dconf/Nautilus.nix +++ b/home/file/dconf/Nautilus.nix @@ -15,7 +15,7 @@ default-sort-in-reverse-order = false; default-sort-order = "name"; migrated-gtk-settings = true; - search-filter-time-type = "last_modified"; + search-filter-time-type = "name"; search-view = "list-view"; show-image-thumbnails = "local-only"; }; diff --git a/home/file/keyd/module/Firefox.nix b/home/file/keyd/module/Firefox.nix index e8f117f..ef7d08f 100644 --- a/home/file/keyd/module/Firefox.nix +++ b/home/file/keyd/module/Firefox.nix @@ -20,7 +20,7 @@ "alt.space" = "f6"; # Focus address bar. "alt.u" = "C-S-t"; # Restore closed tab. "alt.w" = "macro(y t)"; # Duplicate tab. - # "alt.W" = "macro(y t W)"; # Duplicate tab on new window. # ISSUE: Use S-w to manually detach. + # "alt.W" = "macro(y t W)"; # Duplicate tab on new window. # NOTE: Use S-w to manually detach. "alt.x" = "C-w"; # Close tab. }; }; diff --git a/home/file/waybar/default.nix b/home/file/waybar/default.nix index 5e08b08..50252c0 100644 --- a/home/file/waybar/default.nix +++ b/home/file/waybar/default.nix @@ -21,7 +21,6 @@ let borderSize = "${toString config.module.style.window.border}px"; styleRaw = pkgs.writeText "waybar-style-raw" (util.readFiles (util.ls ./style)); - # NOTE: Another option is to use var() like this: https://git.azahi.cc/nixfiles/tree/modules/firefox/default.nix#n41 https://git.azahi.cc/nixfiles/tree/modules/firefox/userContent.css style = pkgs.replaceVars styleRaw { inherit accent diff --git a/home/program/firefox/default.nix b/home/program/firefox/default.nix index 49a2785..fcd79ac 100644 --- a/home/program/firefox/default.nix +++ b/home/program/firefox/default.nix @@ -341,57 +341,52 @@ in "{446900e4-71c2-419f-a6a7-df9c091e268b}".environment = { base = "https://pass.voronind.com"; }; - # ISSUE: Fork or https://github.com/foxyproxy/browser-extension/issues/132 - # "foxyproxy@eric.h.jung" = { - # mode = "enable"; - # sync = false; - # data = [ - # { - # active = true; - # title = "Local"; - # type = "socks5"; - # hostname = "localhost"; - # port = 1080; - # color = "#ffffff"; - # proxyDNS = true; - # include = [ ]; - # exclude = [ ]; - # } - # { - # active = true; - # title = "Zapret"; - # type = "socks5"; - # hostname = "10.0.0.1"; - # port = 1080; - # color = "#ff0000"; - # proxyDNS = false; - # include = [ ]; - # exclude = [ ]; - # } - # { - # active = true; - # title = "Xray"; - # type = "socks5"; - # hostname = "10.0.0.1"; - # port = 1081; - # color = "#ffff00"; - # proxyDNS = false; - # include = [ ]; - # exclude = [ ]; - # } - # { - # active = true; - # title = "Tor"; - # type = "socks5"; - # hostname = "10.0.0.1"; - # port = 9150; - # color = "#0000ff"; - # proxyDNS = true; - # include = [ "*.onion" ]; - # exclude = [ ]; - # } - # ]; - # }; + "foxyproxy@eric.h.jung" = { + mode = "enable"; + sync = false; + data = [ + { + active = true; + title = "Local"; + type = "socks5"; + hostname = "localhost"; + port = 1080; + color = "#ffffff"; + proxyDNS = true; + include = [ ]; + exclude = [ ]; + } + { + active = true; + title = "Xray"; + type = "socks5"; + hostname = "home.local"; + port = 1080; + color = "#ffff00"; + proxyDNS = false; + include = [ + { + active = true; + pattern = "https://www.youtube.com/*"; + title = "YouTube"; + type = "wildcard"; + } + ]; + exclude = [ ]; + } + { + active = true; + title = "Tor"; + type = "socks5"; + hostname = "home.local"; + port = 9150; + color = "#0000ff"; + proxyDNS = true; + include = [ "*.onion" ]; + exclude = [ ]; + } + ]; + }; }; # NOTE: `firefox-esr` edition is required to change search engines. SearchEngines = { diff --git a/home/program/thunderbird/default.nix b/home/program/thunderbird/default.nix index ecaa860..1f0560c 100644 --- a/home/program/thunderbird/default.nix +++ b/home/program/thunderbird/default.nix @@ -42,42 +42,4 @@ "mailnews.start_page.enabled" = false; "pdfjs.enabledCache.state" = false; }; - - # ISSUE: https://github.com/nix-community/home-manager/issues/5775 - # ISSUE: https://github.com/nix-community/home-manager/issues/5933 - # settings = - # let - # safeName = builtins.replaceStrings [ "." ] [ "-" ]; - # - # calendarAccounts = lib.mapAttrsToList (n: v: { n = v; }) config.home-manager.users.voronind.accounts.calendar.accounts; - # calendars = lib.foldAttrs ( - # item: acc: - # let - # calendarAccountSafeName = safeName item.name; - # in - # acc - # // { - # "calendar.registry.${calendarAccountSafeName}.cache.enabled" = true; - # "calendar.registry.${calendarAccountSafeName}.calendar-main-default" = item.primary; - # "calendar.registry.${calendarAccountSafeName}.calendar-main-in-composite" = item.primary; - # "calendar.registry.${calendarAccountSafeName}.name" = item.name; - # "calendar.registry.${calendarAccountSafeName}.type" = "caldav"; - # "calendar.registry.${calendarAccountSafeName}.uri" = item.remote.url; - # "calendar.registry.${calendarAccountSafeName}.username" = item.remote.userName; - # } - # ) { } calendarAccounts; - # - # contactsAccount = config.home-manager.users.voronind.accounts.contact.accounts.Home; - # contactsAccountSafeName = safeName contactsAccount.name; - # addressBookFilename = "abook-${contactsAccountSafeName}.sqlite"; - # in - # calendars - # // { - # "ldap_2.servers.${contactsAccountSafeName}.carddav.url" = contactsAccount.remote.url; - # "ldap_2.servers.${contactsAccountSafeName}.carddav.username" = contactsAccount.remote.userName; - # "ldap_2.servers.${contactsAccountSafeName}.description" = contactsAccount.name; - # "ldap_2.servers.${contactsAccountSafeName}.dirType" = 102; - # "ldap_2.servers.${contactsAccountSafeName}.filename" = addressBookFilename; - # "mail.collect_addressbook" = "jscarddav://${addressBookFilename}"; - # }; } diff --git a/overlay/Tmux.nix b/overlay/Tmux.nix index b043c64..f80d374 100644 --- a/overlay/Tmux.nix +++ b/overlay/Tmux.nix @@ -1,7 +1,7 @@ { __findFile, ... }: { # SEE: https://github.com/tmux/tmux/issues/4264 - # FIXME: Later. + # FIXME: Later. When you get no error on start on Android. nixpkgs.overlays = [ (final: prev: { tmux = prev.tmux.overrideAttrs (old: {