diff options
Diffstat (limited to '')
-rw-r--r-- | darwinConfigurations/mairon/default.nix | 30 | ||||
-rw-r--r-- | flake.lock | 80 | ||||
-rw-r--r-- | modules/common/common/nix/default.nix | 64 | ||||
-rw-r--r-- | modules/common/direnv.nix | 12 | ||||
-rw-r--r-- | modules/common/qutebrowser.nix | 5 | ||||
-rw-r--r-- | modules/darwin/homebrew.nix | 7 | ||||
-rw-r--r-- | modules/nixos/firefox/default.nix | 327 | ||||
-rw-r--r-- | modules/nixos/firefox/userContent.css | 14 |
8 files changed, 472 insertions, 67 deletions
diff --git a/darwinConfigurations/mairon/default.nix b/darwinConfigurations/mairon/default.nix index 27b0895..bbc31eb 100644 --- a/darwinConfigurations/mairon/default.nix +++ b/darwinConfigurations/mairon/default.nix @@ -14,17 +14,25 @@ with lib; { extraConfig."url \"git@gitlab.services.work.com:\"".insteadOf = "work:"; }; - homebrew.casks = [ - {name = "burp-suite";} - {name = "docker";} - {name = "jetbrains-toolbox";} - {name = "obs";} - {name = "openlens";} - {name = "postman";} - {name = "vial";} - {name = "wireshark";} - {name = "xcodes";} - ]; + homebrew = { + taps = [ + {name = "kreuzwerker/homebrew-taps";} + ]; + brews = [ + {name = "m1-terraform-provider-helper";} + ]; + casks = [ + {name = "burp-suite";} + {name = "docker";} + {name = "jetbrains-toolbox";} + {name = "obs";} + {name = "openlens";} + {name = "postman";} + {name = "vial";} + {name = "wireshark";} + {name = "xcodes";} + ]; + }; networking = { computerName = mkForce this.hostname; diff --git a/flake.lock b/flake.lock index 0c41e9f..37617bd 100644 --- a/flake.lock +++ b/flake.lock @@ -87,11 +87,11 @@ "azahi-cc": { "flake": false, "locked": { - "lastModified": 1679575230, - "narHash": "sha256-gz4gdPIKuC9mVKytjFv8hS/1yz5olkn0GRa0deGzNUI=", + "lastModified": 1688374221, + "narHash": "sha256-FK8wJXsOQHzLH3QJ932xJXan8NmWjJbenjL9OAZzw7w=", "ref": "master", - "rev": "4db34391d8381a13ce0d0e59b6fde3721c8249f5", - "revCount": 16, + "rev": "e5faa2c2cb107c77ce2f4268c6b5d3d01be078cb", + "revCount": 17, "type": "git", "url": "https://git.azahi.cc/azahi-cc" }, @@ -124,11 +124,11 @@ ] }, "locked": { - "lastModified": 1688307440, - "narHash": "sha256-7PTjbN+/+b799YN7Tk2SS5Vh8A0L3gBo8hmB7Y0VXug=", + "lastModified": 1688882536, + "narHash": "sha256-JXhHLy3+OxRghen7X8no1/8Ab+NkYSxrCIB9IILKUUc=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "b06bab83bdf285ea0ae3c8e145a081eb95959047", + "rev": "4e3fc1864712a534d30ef074d695e968f1fb1487", "type": "github" }, "original": { @@ -186,11 +186,11 @@ ] }, "locked": { - "lastModified": 1688254665, - "narHash": "sha256-8FHEgBrr7gYNiS/NzCxIO3m4hvtLRW9YY1nYo1ivm3o=", + "lastModified": 1688466019, + "narHash": "sha256-VeM2akYrBYMsb4W/MmBo1zmaMfgbL4cH3Pu8PGyIwJ0=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "267149c58a14d15f7f81b4d737308421de9d7152", + "rev": "8e8d955c22df93dbe24f19ea04f47a74adbdc5ec", "type": "github" }, "original": { @@ -264,11 +264,11 @@ ] }, "locked": { - "lastModified": 1688302761, - "narHash": "sha256-YIYKeX3YfoAIg9DTe6cl1ga87rDCNDZugdGuqsvEN30=", + "lastModified": 1688875170, + "narHash": "sha256-hNYMNl07J22c0K0NhVyvF6cF8mahOCzBTNKT/OEQN14=", "owner": "nix-community", "repo": "home-manager", - "rev": "c85d9137db45a1c9c161f4718b13cc3bd4cbd173", + "rev": "86157256d2e0d257c53eefeb008230f043e12210", "type": "github" }, "original": { @@ -323,11 +323,11 @@ ] }, "locked": { - "lastModified": 1688349470, - "narHash": "sha256-90tE0wszarJ3hp93SUWmZ0CMXr1MVR4xVHyZobbvzQo=", + "lastModified": 1688868368, + "narHash": "sha256-dIAtHTXUZvqYzBxi0+SVMrE4A2+K8kD3q70fw0WnIGk=", "owner": "Infinidoge", "repo": "nix-minecraft", - "rev": "4dcf55d23ca64136877766a1df5056ad2ba5702b", + "rev": "d612610255db2376426a97402051d141aac044ee", "type": "github" }, "original": { @@ -350,11 +350,11 @@ ] }, "locked": { - "lastModified": 1688348068, - "narHash": "sha256-zfqzsSrJP7C0zgZjIllLb6ZXi5vatDsizFHRL8XJ/Fk=", + "lastModified": 1688867279, + "narHash": "sha256-r7QYU+m9RJN/CUGgBy9mDgtoYIk39sKVoLnP1MrC6js=", "owner": "nix-community", "repo": "nix-vscode-extensions", - "rev": "0d3490d9ab18d777a0d20c62f40efabfd6263111", + "rev": "9e67835766a04a232f12980927f4a20e325b3d2d", "type": "github" }, "original": { @@ -366,11 +366,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1686838567, - "narHash": "sha256-aqKCUD126dRlVSKV6vWuDCitfjFrZlkwNuvj5LtjRRU=", + "lastModified": 1688798314, + "narHash": "sha256-MFG5rx7L756rtrPHsL662m64AZ4sKqUcApaiYgSKfNM=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "429f232fe1dc398c5afea19a51aad6931ee0fb89", + "rev": "47dca15d86fdd2eabcf434d7cc0b5baa8d1a463c", "type": "github" }, "original": { @@ -382,11 +382,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1688221086, - "narHash": "sha256-cdW6qUL71cNWhHCpMPOJjlw0wzSRP0pVlRn2vqX/VVg=", + "lastModified": 1688829822, + "narHash": "sha256-hv56yK1fPHPt7SU2DboxBtdSbIuv9nym7Dss7Cn2jic=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "cd99c2b3c9f160cd004318e0697f90bbd5960825", + "rev": "ed6afb10dfdfc97b6bcf0703f1bad8118e9e961b", "type": "github" }, "original": { @@ -398,11 +398,11 @@ }, "nixpkgs-master": { "locked": { - "lastModified": 1688370749, - "narHash": "sha256-4es2tyjkLJL+EDmMTUl/LOtM/ytp+2PH/uGd5CKNeNo=", + "lastModified": 1688891216, + "narHash": "sha256-ZUQs8C5N6aw/QeBhUFGcX89OoYoP9jbdmbR6aSbvaHg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "13718e97ec434de08285c72d937a54d3ecf03dc4", + "rev": "e4a12fdac2a313b18e7f66a097108412b07c5f00", "type": "github" }, "original": { @@ -414,11 +414,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1688363206, - "narHash": "sha256-/vGiYeXjgzWCBNbA1JTPU8xpCSwFr3ENZXGtX26Nmkc=", + "lastModified": 1688868408, + "narHash": "sha256-RR9N5XTAxSBhK8MCvLq9uxfdkd7etC//seVXldy0k48=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "eaec6e428ea79bf803301d4bc989f1fc2c891fb7", + "rev": "510d721ce097150ae3b80f84b04b13b039186571", "type": "github" }, "original": { @@ -464,11 +464,11 @@ }, "nur": { "locked": { - "lastModified": 1688369118, - "narHash": "sha256-ieJfKcJ/ky19zvyTASYCCmPvXQ6QRF/XY9aWLi5cmkA=", + "lastModified": 1688881344, + "narHash": "sha256-q2okqZ5BzM1AJMS2OeNt6KEGA2ZsCVXo7GQNXhg9UHE=", "owner": "nix-community", "repo": "NUR", - "rev": "1fec0607786d389341c0a9e565673b5af595ff6a", + "rev": "1fd9c989dedb03d424a13b315c65f78abcb5503d", "type": "github" }, "original": { @@ -528,11 +528,11 @@ ] }, "locked": { - "lastModified": 1688137124, - "narHash": "sha256-ramG4s/+A5+t/QG2MplTNPP/lmBWDtbW6ilpwb9sKVo=", + "lastModified": 1688596063, + "narHash": "sha256-9t7RxBiKWHygsqXtiNATTJt4lim/oSYZV3RG8OjDDng=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "522fd47af79b66cdd04b92618e65c7a11504650a", + "rev": "c8d18ba345730019c3faf412c96a045ade171895", "type": "github" }, "original": { @@ -592,11 +592,11 @@ ] }, "locked": { - "lastModified": 1688064897, - "narHash": "sha256-Q3CZc6ZfC4KpjGWVPsrofFgxor+UjqhbFBSi7YmHVvI=", + "lastModified": 1688586836, + "narHash": "sha256-5uLYGa+8lysS1X5ehdU3ewmrMIG8p9+qS7yJ0LyhMHs=", "owner": "simple-nixos-mailserver", "repo": "nixos-mailserver", - "rev": "0c1801b48995ec6909e040abedaa56a64f0db430", + "rev": "d460e9ff62ea1238fb3348a87326b743ae177902", "type": "gitlab" }, "original": { diff --git a/modules/common/common/nix/default.nix b/modules/common/common/nix/default.nix index 5dda142..840bdab 100644 --- a/modules/common/common/nix/default.nix +++ b/modules/common/common/nix/default.nix @@ -4,7 +4,6 @@ lib, localUsername ? lib.my.username, pkgs, - pkgsPr, this, ... }: @@ -115,9 +114,68 @@ with lib; { luajit ]); }); - - inherit (pkgsPr "228852" "sha256-NKZySJ3IVMMeSmpc1zYwse52kxGg0dIrsHTMcO8a73Y=") soju; } + // (let + openconnect = super.openconnect.overrideAttrs (_: _: { + version = "unstable-2023-07-01"; + src = super.fetchFromGitLab { + owner = "openconnect"; + repo = "openconnect"; + rev = "0e5a69e8f990ece134b50ec0be7b6bf42f14dfbd"; + hash = "sha256-/8ybs7tlmdVIZORxdcB/xE9Mpyo2cX+VN7eQAS7Qb5k="; + }; + }); + in { + networkmanager-openconnect = + (super.networkmanager-openconnect.override {inherit openconnect;}) + .overrideAttrs (_: final: { + version = "unstable-2023-05-29"; + src = super.fetchFromGitLab { + domain = "gitlab.gnome.org"; + owner = "GNOME"; + repo = "NetworkManager-openconnect"; + rev = "030a3a9f05560bdb515ec2a6dad3a0ffbab3b213"; + hash = "sha256-GvhBKAQmbmzgM1Bh2j6carnGwtL/z5rbPl/jL/4kDoc="; + }; + buildInputs = + final.buildInputs + ++ [ + (super.webkitgtk_4_1.override { + inherit (super.gnome) libsoup; + }) + ]; + nativeBuildInputs = + final.nativeBuildInputs + ++ [ + super.autoreconfHook + ]; + preAutoreconf = '' + autoupdate + ''; + preConfigure = '' + NOCONFIGURE=x ./autogen.sh + touch gtk4/nm-openconnect-dialog.ui + ''; + }); + + plasma5Packages = + super.plasma5Packages + // { + plasma-nm = + (super.plasma5Packages.plasma-nm.override {inherit openconnect;}) + .overrideAttrs (_: final: { + buildInputs = final.buildInputs ++ [super.qt5.qtwebengine]; + patches = + final.patches + ++ [ + (super.fetchpatch { + url = "https://invent.kde.org/plasma/plasma-nm/-/commit/6ef64be8645ac32fc0b42df2cee5d9ff3b57e485.patch"; + sha256 = "sha256-b5yTMB7s+wG7X/EyuEa5tBrUU8oKc1Wa0zn0ND1rtI0="; + }) + ]; + }); + }; + }) // (with super; let np = nodePackages; in { diff --git a/modules/common/direnv.nix b/modules/common/direnv.nix index b235cee..6ec39d1 100644 --- a/modules/common/direnv.nix +++ b/modules/common/direnv.nix @@ -10,13 +10,13 @@ in { mkEnableOption "direnv"; config = mkIf cfg.enable { - hm = { - programs.direnv = { - enable = true; - nix-direnv.enable = true; + hm.programs.direnv = { + enable = true; + config.global = { + strict_env = true; + warn_timeout = 0; }; - - home.sessionVariables.DIRENV_LOG_FORMAT = ""; + nix-direnv.enable = true; }; }; } diff --git a/modules/common/qutebrowser.nix b/modules/common/qutebrowser.nix index 7913001..9484ce1 100644 --- a/modules/common/qutebrowser.nix +++ b/modules/common/qutebrowser.nix @@ -29,14 +29,10 @@ in { ansible = "https://galaxy.ansible.com/search?keywords={}"; arch = "https://wiki.archlinux.org/?search={}"; crates = "https://crates.io/search?q={}"; - crawl = "http://crawl.chaosforge.org/index.php?search={}"; discogs = "https://www.discogs.com/search/?q={}"; - dockerdocs = "https://docs.docker.com/search/?q={}"; dockerhub = "https://hub.docker.com/search?q={}"; doublegis = "https://2gis.ru/search/{}"; duckduckgo = "https://duckduckgo.com/?q={}'"; - dwarffortress = "https://dwarffortresswiki.org/index.php?search={}"; - ebay = "https://www.ebay.com/sch/i.html?_nkw={}"; ecosia = "https://www.ecosia.org/search?q={}"; factorio = "https://wiki.factorio.com/index.php?search={}"; genius = "https://genius.com/search?q={}"; @@ -95,7 +91,6 @@ in { d = duckduckgo; do = dockerhub; docker = dockerhub; - dod = dockerdocs; g = google; gh = github; h = hoogle; diff --git a/modules/darwin/homebrew.nix b/modules/darwin/homebrew.nix index f0bec9b..2667828 100644 --- a/modules/darwin/homebrew.nix +++ b/modules/darwin/homebrew.nix @@ -9,13 +9,18 @@ in { options.nixfiles.modules.homebrew.enable = mkEnableOption "Homebrew"; config = mkIf cfg.enable { + hm.programs.bash.initExtra = mkAfter '' + if [ -x "/opt/homebrew/bin/brew" ]; then + export PATH="$PATH:/opt/homebrew/bin" + fi + ''; + # This option requires an installed Homebrew[1]. # # [1]: https://daiderd.com/nix-darwin/manual/index.html#opt-homebrew.enable # [1]: https://brew.sh homebrew = { enable = true; - taps = []; onActivation = { autoUpdate = true; cleanup = "zap"; diff --git a/modules/nixos/firefox/default.nix b/modules/nixos/firefox/default.nix index 30927b3..b4f99af 100644 --- a/modules/nixos/firefox/default.nix +++ b/modules/nixos/firefox/default.nix @@ -82,6 +82,333 @@ in { ] ++ optional config.nixfiles.modules.ipfs.enable ipfs-companion; + search = { + force = true; + + default = "DuckDuckGo"; + order = ["DuckDuckGo" "Google" "Yandex"]; + + engines = { + "Ebay".metaData.hidden = true; + "Amazon.com".metaData.hidden = true; + + "2GIS" = { + urls = [{template = "https://2gis.ru/kazan/search/{searchTerms}";}]; + icon = ''${pkgs.fetchurl { + url = "https://d-assets.2gis.ru/favicon.png"; + sha256 = "sha256-BlSaYRcUx9zhfJnVK5V7rsyft4qaueIEOONiCg+6aLE="; + }}''; + definedAliases = ["@2gis"]; + }; + + "AliExpress" = { + urls = [{template = "https://aliexpress.ru/wholesale?SearchText={searchTerms}";}]; + icon = ''${pkgs.fetchurl { + url = "ae01.alicdn.com/images/eng/wholesale/icon/aliexpress.ico"; + sha256 = "sha256-7xgem2pY2PNuv8as1YnS+U03GvDLLGjhcDLt69rtmaA="; + }}''; + definedAliases = ["@aliexpress" "@ali"]; + }; + + "Ansible Galaxy" = { + urls = [{template = "https://galaxy.ansible.com/search?keywords={searchTerms}";}]; + icon = ''${pkgs.fetchurl { + url = "https://galaxy.ansible.com/assets/favicon.ico"; + sha256 = "sha256-oAolpZhdKbVTraes6dDlafpvq/Vypu264vgKN4jzJk8="; + }}''; + definedAliases = ["@ansible" "@galaxy" "@ag"]; + }; + + "Arch Wiki" = { + urls = [{template = "https://wiki.archlinux.org/index.php?search={searchTerms}";}]; + icon = "${pkgs.fetchurl { + url = "https://wiki.archlinux.org/favicon.ico"; + sha256 = "sha256-0uxMtT8myzTT7p9k6v5UxsguPKu+vHPlglNTMbnN1T0="; + }}"; + definedAliases = ["@archwiki" "@aw"]; + }; + + "crates.io" = { + urls = [{template = "https://crates.io/search?q={searchTerms}";}]; + icon = ''${pkgs.fetchurl { + url = "https://crates.io/favicon.ico"; + sha256 = "sha256-upooA/+m5KMUD1t4WFY3EOmytdpUFgNqUj12Auta1mM="; + }}''; + definedAliases = ["@crates"]; + }; + + "Discogs" = { + urls = [{template = "https://www.discogs.com/search?q={searchTerms}";}]; + icon = ''${pkgs.fetchurl { + url = "https://st.discogs.com/d56dcb7367720ea20f1b11a4385705517c7e7702/images/favicon.ico"; + sha256 = "sha256-zEDrbmcUf8XHUyYzNc6JsWzBioX8sm8tjScGHim5VTk="; + }}''; + definedAliases = ["@discogs"]; + }; + + "Docker Hub" = { + urls = [{template = "https://hub.docker.com/search?q={searchTerms}";}]; + icon = ''${pkgs.fetchurl { + url = "https://www.docker.com/wp-content/uploads/2023/04/cropped-Docker-favicon-32x32.png"; + sha256 = "sha256-4NmHGMaq31qoIvdlmy7fI3qTbkcp1/tJhqQu/9Ci4/c="; + }}''; + definedAliases = ["@dockerhub" "@docker"]; + }; + + "Ecosia" = { + urls = [{template = "https://www.ecosia.org/search?q={searchTerms}";}]; + icon = ''${pkgs.fetchurl { + url = "https://cdn-static.ecosia.org/static/icons/favicon.ico"; + sha256 = "sha256-uvPShG1yVh4C4zaJmGuhhr96V/NredB1Wte9O3U6QxA="; + }}''; + definedAliases = ["@ecosia"]; + }; + + "Genius" = { + urls = [{template = "https://genius.com/search?q={searchTerms}";}]; + icon = ''${pkgs.fetchurl { + url = "https://assets.genius.com/images/apple-touch-icon.png"; + sha256 = "sha256-M9YQEVg3T7hMO/xPfihR1aXfG+/pNiVOBCOtzx3GrkE="; + }}''; + definedAliases = ["@genius"]; + }; + + "GitHub" = { + urls = [{template = "https://github.com/search?q={searchTerms}";}]; + icon = ''${pkgs.fetchurl { + url = "https://github.githubassets.com/favicons/favicon-dark.svg"; + sha256 = "sha256-qu/d9ftvsntplFuxw9RFL8BpI9b2g5b6xfeGw6Ekh6w="; + }}''; + definedAliases = ["@github" "@gh"]; + }; + + "godocs.io" = { + urls = [{template = "https://godocs.io/?q={}";}]; + icon = ''${pkgs.fetchurl { + url = "https://go.dev/images/favicon-gopher.svg"; + sha256 = "sha256-OlKpUUeYF8TtMoX4e0ERK1ocIb53OJ8ZDxvwJaQVM/0="; + }}''; + definedAliases = ["@godocs"]; + }; + + "pkgs.go.dev" = { + urls = [{template = "https://pkg.go.dev/search?q={searchTerms}";}]; + icon = ''${pkgs.fetchurl { + url = "https://go.dev/images/favicon-gopher.svg"; + sha256 = "sha256-OlKpUUeYF8TtMoX4e0ERK1ocIb53OJ8ZDxvwJaQVM/0="; + }}''; + definedAliases = ["@gopkgs"]; + }; + + "Hackage" = { + urls = [{template = "https://hackage.haskell.org/packages/search?terms={searchTerms}";}]; + icon = ''${pkgs.fetchurl { + url = "https://hackage.haskell.org/static/favicon.png"; + sha256 = "sha256-+6WAv93yaA3L2eheGKxklY/uRAvbKD1q/WcmufmhKxY="; + }}''; + definedAliases = ["@hackage"]; + }; + + "Hoogle" = { + urls = [{template = "https://hoogle.haskell.org/?hoogle={searchTerms}";}]; + icon = ''${pkgs.fetchurl { + url = "https://hoogle.haskell.org/favicon.png"; + sha256 = "sha256-6qmjRYDDRUwm6EdLoZB6o9XtoujsfDEQJ9xOu3Knei8="; + }}''; + definedAliases = ["@hoogle"]; + }; + + "Jisho" = { + urls = [{template = "https://jisho.org/search/{searchTerms}";}]; + icon = ''${pkgs.fetchurl { + url = "https://assets.jisho.org/assets/favicon-062c4a0240e1e6d72c38aa524742c2d558ee6234497d91dd6b75a182ea823d65.ico"; + sha256 = "sha256-BixKAkDh5tcsOKpSR0LC1VjuYjRJfZHda3WhguqCPWU="; + }}''; + definedAliases = ["@jisho"]; + }; + + "コトバンク" = { + urls = [{template = "https://kotobank.jp/gs/?q={searchTerms}";}]; + icon = ''${pkgs.fetchurl { + url = "https://kotobank.jp/favicon.ico"; + sha256 = "sha256-t+EzqURlQwznuBqa0GcBbqumvZqtU7HrEAjGUlqp1tg="; + }}''; + definedAliases = ["@kotobank"]; + }; + + "Kubernetes" = { + urls = [{template = "https://kubernetes.io/search/?q={searchTerms}";}]; + icon = ''${pkgs.fetchurl { + url = "https://kubernetes.io/images/favicon.png"; + sha256 = "sha256-YI5QvGQXoaTG3uUGQ/R99Xl2r+VqBAA1qqthzPbf8nQ="; + }}''; + definedAliases = ["@kubernetes" "@k8s"]; + }; + + "Last.fm" = { + urls = [{template = "https://www.last.fm/search?q={searchTerms}";}]; + icon = ''${pkgs.fetchurl { + url = "https://www.last.fm/static/images/favicon.702b239b6194.ico"; + sha256 = "sha256-ID+DfF+dZ5CzKiBp/psQPRD6r/06PZ0rVYiELWUt5Mw="; + }}''; + definedAliases = ["@lastfm"]; + }; + + "MDN" = { + urls = [{template = "https://developer.mozilla.org/en-US/search?q={searchTerms}";}]; + icon = ''${pkgs.fetchurl { + url = "https://developer.mozilla.org/favicon-48x48.cbbd161b.png"; + sha256 = "sha256-Wnd0BqQIKgroGmV+R8vqV9uNBwDvcxBrQ8hXOLOFeKY="; + }}''; + definedAliases = ["@mdn"]; + }; + + "MELPA" = { + urls = [{template = "https://melpa.org/#/?q={searchTerms}";}]; + icon = ''${pkgs.fetchurl { + url = "https://melpa.org/favicon.ico"; + sha256 = "sha256-bmlydqXBM8MUMC6cOTGSHPx6zN8tZFqmQ+srbXkSCA4="; + }}''; + definedAliases = ["@melpa"]; + }; + + "MusicBrainz" = { + urls = [{template = "https://musicbrainz.org/search?type=artist&query={searchTerms}";}]; + icon = ''${pkgs.fetchurl { + url = "https://musicbrainz.org/static/images/favicons/favicon-16x16.png"; + sha256 = "sha256-M5mKQurmO9AP0gfC+5OLwi8k4XWQy759eQrrKAeytl0="; + }}''; + definedAliases = ["@musicbrainz" "@mb"]; + }; + + "NixOS Packages" = { + urls = [{template = "https://search.nixos.org/packages?channel=unstable&query={searchTerms}";}]; + icon = ''${pkgs.fetchurl { + url = "https://nixos.org/favicon.png"; + sha256 = "sha256-awcsDbbpRcDJnJpRavj/IcKMReEektRcqKbE35IJTKQ="; + }}''; + definedAliases = ["@nixpkgs" "@np"]; + }; + + "NixOS Options" = { + urls = [{template = "https://search.nixos.org/options?channel=unstable&query={searchTerms}";}]; + icon = ''${pkgs.fetchurl { + url = "https://nixos.org/favicon.png"; + sha256 = "sha256-awcsDbbpRcDJnJpRavj/IcKMReEektRcqKbE35IJTKQ="; + }}''; + definedAliases = ["@nixopts" "@no"]; + }; + + "NixOS Wiki" = { + urls = [{template = "https://nixos.wiki/index.php?search={searchTerms}";}]; + icon = ''${pkgs.fetchurl { + url = "https://nixos.wiki/favicon.png"; + sha256 = "sha256-DE8IgVninF6Aq3iNMgerhvF1dpoXqDUSibtWSpf/dN4="; + }}''; + definedAliases = ["@nixoswiki" "@nw"]; + }; + + "OpenStreetMap" = { + urls = [{template = "https://www.openstreetmap.org/search?query={searchTerms}";}]; + icon = ''${pkgs.fetchurl { + url = "https://www.openstreetmap.org/assets/favicon-32x32-99b88fcadeef736889823c8a886b89d8cada9d4423a49a27de29bacc0a6bebd1.png"; + sha256 = "sha256-dt4QVbQPdb4neS/fwH3yOWOSbEdkjMZtAYnIeCfr7qI="; + }}''; + definedAliases = ["@openstreetmap" "@osm" "@maps"]; + }; + + "ProtonDB" = { + urls = [{template = "https://www.protondb.com/search?q={searchTerms}";}]; + icon = ''${pkgs.fetchurl { + url = "https://www.protondb.com/sites/protondb/images/favicon.ico"; + sha256 = "sha256-oauOp0EASNjMcThfzYJ2TfbaOYHBPL8LOp+9lmp4pmc="; + }}''; + definedAliases = ["@protondb"]; + }; + + "PyPI" = { + urls = [{template = "https://pypi.org/search/?q={searchTerms}";}]; + icon = ''${pkgs.fetchurl { + url = "https://pypi.org/static/images/logo-small.2a411bc6.svg"; + sha256 = "sha256-+fcSfcNxAMLIFkp+gh52c48lQORoyhcegUIFtuq/zYs="; + }}''; + definedAliases = ["@pypi"]; + }; + + "Python Docs" = { + urls = [{template = "https://docs.python.org/3/search.html?q={searchTerms}";}]; + icon = ''${pkgs.fetchurl { + url = "https://docs.python.org/3/_static/py.svg"; + sha256 = "sha256-WGW+i8wK+IhZSQPqARL2yNkjxXJsQIHoyFYRDMcznO8="; + }}''; + definedAliases = ["@pydocs"]; + }; + + "Rate Your Music" = { + urls = [{template = "https://rateyourmusic.com/search?searchterm={searchTerms}";}]; + icon = ''${pkgs.fetchurl { + url = "https://e.snmc.io/3.0/img/logo/sonemic-32.png"; + sha256 = "sha256-JpTt1tjBkUvDMTGrG7Hg2EiE8PR3RL7McodeZk1EpZA="; + }}''; + definedAliases = ["@rym"]; + }; + + "Rust Std" = { + urls = [{template = "https://doc.rust-lang.org/std/?search={searchTerms}";}]; + icon = ''${pkgs.fetchurl { + url = "https://www.rust-lang.org/static/images/favicon-32x32.png"; + sha256 = "sha256-l2y4jpnODbua4dyLvXTMBlHVkoDPM9y00l6L61so7eA="; + }}''; + definedAliases = ["@ruststd" "@rust"]; + }; + + "SourceHut" = { + urls = [{template = "https://sr.ht/projects?search={searchTerms}";}]; + icon = ''${pkgs.fetchurl { + url = "https://sr.ht/static/logo.png"; + sha256 = "sha256-NBzKZhqE9//zVJlOwYiwyW/jRFh8+nS2YvC3zMCQ1fU="; + }}''; + definedAliases = ["@sourcehut" "@srht"]; + }; + + "SteamDB" = { + urls = [{template = "https://steamdb.info/search/?a=app&q={searchTerms}";}]; + icon = ''${pkgs.fetchurl { + url = "https://steamdb.info/static/logos/32px.png"; + sha256 = "sha256-IUBiB5JUSvyDa+m/wecmHB8s3Wfu0JK98bJ+ZRZ5ybQ="; + }}''; + definedAliases = ["@steamdb"]; + }; + + "WolframAlpha" = { + urls = [{template = "https://www.wolframalpha.com/input?i={searchTerms}";}]; + icon = ''${pkgs.fetchurl { + url = "https://www.wolframalpha.com/_next/static/images/favicon_1zbE9hjk.ico"; + sha256 = "sha256-S9k7AlBQiDElBCGopJ8xfBD6dIhGU+EBh8t1QYbP2S4="; + }}''; + definedAliases = ["@wolframalpha" "@wa"]; + }; + + "Yandex" = { + urls = [{template = "https://yahoo.com/search/?text={searchTerms}";}]; + icon = ''${pkgs.fetchurl { + url = "https://yastatic.net/s3/web4static/_/v2/oxjfXL1EO-B5Arm80ZrL00p0al4.png"; + sha256 = "sha256-gvYh4oCZEO7BL2QZ6QvQFlmFiP2L4SLJrxAsKFcG6G4="; + }}''; + definedAliases = ["@yahoo" "@ya"]; + }; + + "YouTube" = { + urls = [{template = "https://yewtu.be/search?q={}";}]; + icon = ''${pkgs.fetchurl { + url = "https://www.youtube.com/s/desktop/280a3f09/img/favicon.ico"; + sha256 = "sha256-i7HQ+kOhdDbVndVG9vdMdtxEc13vdSLCLYAxFm24kR0="; + }}''; + definedAliases = ["@youtube" "@yt"]; + }; + }; + }; + # https://github.com/arkenfox/user.js/blob/master/user.js arkenfox = { enable = true; diff --git a/modules/nixos/firefox/userContent.css b/modules/nixos/firefox/userContent.css index 6335ff5..5a297ab 100644 --- a/modules/nixos/firefox/userContent.css +++ b/modules/nixos/firefox/userContent.css @@ -291,7 +291,8 @@ { #nav-footer, .main-document-header-container.top-navigation, - .mdn-cta-container { + .mdn-cta-container, + .top-banner.fallback { display: none !important; } @@ -355,3 +356,14 @@ display: none !important; } } + +@-moz-document regexp("https?://ecosia\.org.*") +{ + .cookie-wrapper, + .main-header__install-cta, + .meta-results, + .notifications, + .personal-counter { + display: none !important; + } +} |