diff options
author | Azat Bahawi <azat@bahawi.net> | 2024-07-21 20:07:08 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2024-07-21 20:07:08 +0300 |
commit | b33b1ea8ef5d5511e34fed41ad9a8199d0d58331 (patch) | |
tree | 9195b87cbfc135a85b56f0a415efa23e504f8c40 /modules | |
parent | 2024-07-14 (diff) |
2024-07-21
Diffstat (limited to '')
-rw-r--r-- | modules/common/nix.nix | 41 | ||||
-rw-r--r-- | modules/firefox/addons.nix | 18 | ||||
-rw-r--r-- | modules/firefox/default.nix | 56 | ||||
-rw-r--r-- | modules/git/default.nix | 5 | ||||
-rw-r--r-- | modules/nsd.nix | 3 | ||||
-rw-r--r-- | modules/shadowsocks.nix | 2 | ||||
-rw-r--r-- | modules/vim.nix | 4 |
7 files changed, 41 insertions, 88 deletions
diff --git a/modules/common/nix.nix b/modules/common/nix.nix index fec9b80..233edda 100644 --- a/modules/common/nix.nix +++ b/modules/common/nix.nix @@ -24,36 +24,11 @@ in config = let - useNixpkgs = - nixpkgs: - import nixpkgs { - inherit (config.nixpkgs) config; - inherit (this) system; - }; - - pkgsLocal = useNixpkgs "${config.my.home}/src/nixpkgs"; # Impure! - pkgsMaster = useNixpkgs inputs.nixpkgs-master; - pkgsStable = useNixpkgs inputs.nixpkgs-stable; - pkgsRev = - rev: hash: - useNixpkgs ( - pkgs.fetchFromGitHub { - owner = "NixOS"; - repo = "nixpkgs"; - inherit rev hash; - } - ); - pkgsPR = pr: pkgsRev "refs/pull/${toString pr}/head"; + pkgsLocal = packages.useNixpkgs "${config.my.home}/src/nixpkgs"; # Impure! in { _module.args = { - inherit - pkgsLocal - pkgsMaster - pkgsStable - pkgsRev - pkgsPR - ; + inherit pkgsLocal; }; hm = { @@ -126,12 +101,12 @@ in overlays = with inputs; [ self.overlays.default - (_: _prev: { - # Global PR package overrides go here. Example: - # ``` - # inherit (pkgsPR 309018 "sha256-x3ATxjrTVdaX5eo9P6pz+8/W6D2TNYzvjZpOBa3ZRI8=") endlessh-go; - # ``` - }) + # (_: _prev: with packages; { + # # Global PR package overrides go here. Example: + # # ``` + # # inherit (package.formPR 309018 "sha256-x3ATxjrTVdaX5eo9P6pz+8/W6D2TNYzvjZpOBa3ZRI8=") endlessh-go; + # # ``` + # }) ]; }; diff --git a/modules/firefox/addons.nix b/modules/firefox/addons.nix index d53d9c9..70312f0 100644 --- a/modules/firefox/addons.nix +++ b/modules/firefox/addons.nix @@ -50,10 +50,10 @@ }; "darkreader" = buildFirefoxXpiAddon { pname = "darkreader"; - version = "4.9.87"; + version = "4.9.88"; addonId = "addon@darkreader.org"; - url = "https://addons.mozilla.org/firefox/downloads/file/4310627/darkreader-4.9.87.xpi"; - sha256 = "0327d42e507979b0a0443b6aad24d011fea50dd020bcfd07b326bd3df285c79b"; + url = "https://addons.mozilla.org/firefox/downloads/file/4317971/darkreader-4.9.88.xpi"; + sha256 = "7a965d5880be9fbf8be81a106acd1968263b1acc2db0add580b30f2dd71954b3"; meta = with lib; { homepage = "https://darkreader.org/"; description = "Dark mode for every website. Take care of your eyes, use dark theme for night and daily browsing."; @@ -119,10 +119,10 @@ }; "languagetool" = buildFirefoxXpiAddon { pname = "languagetool"; - version = "8.9.1"; + version = "8.10.4"; addonId = "languagetool-webextension@languagetool.org"; - url = "https://addons.mozilla.org/firefox/downloads/file/4298468/languagetool-8.9.1.xpi"; - sha256 = "0747fcd4d7066ac746d140b93870a37eb5cf3241c3a5759128c54bf12b14feea"; + url = "https://addons.mozilla.org/firefox/downloads/file/4317259/languagetool-8.10.4.xpi"; + sha256 = "cf5fed5704ac8b6d4052fcf5819d1aa46ee61c76811393a7e355064baa32679c"; meta = with lib; { homepage = "https://languagetool.org"; description = "With this extension you can check text with the free style and grammar checker LanguageTool. It finds many errors that a simple spell checker cannot detect, like mixing up there/their, a/an, or repeating a word."; @@ -288,10 +288,10 @@ }; "violentmonkey" = buildFirefoxXpiAddon { pname = "violentmonkey"; - version = "2.19.0"; + version = "2.20.0"; addonId = "{aecec67f-0d10-4fa7-b7c7-609a2db280cf}"; - url = "https://addons.mozilla.org/firefox/downloads/file/4289102/violentmonkey-2.19.0.xpi"; - sha256 = "105433e09e87b33431f9b47351c13e189a6d9e6df9eb5d425b3d97676ea3dc3c"; + url = "https://addons.mozilla.org/firefox/downloads/file/4315769/violentmonkey-2.20.0.xpi"; + sha256 = "94fe88507ea47e8cc5ca80b76a6aaec44a486dbfd515a03f82f228dc24d49910"; meta = with lib; { homepage = "https://violentmonkey.github.io/"; description = "Userscript support for browsers, open source."; diff --git a/modules/firefox/default.nix b/modules/firefox/default.nix index ce2cecc..79c7320 100644 --- a/modules/firefox/default.nix +++ b/modules/firefox/default.nix @@ -111,15 +111,11 @@ in }: stdenv.mkDerivation { name = "${pname}-${version}"; - inherit meta; src = fetchurl { inherit url sha256; }; - preferLocalBuild = true; - allowSubstitutes = true; buildCommand = '' - dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" - mkdir -p "$dst" - install -v -m644 "$src" "$dst/${addonId}.xpi" + install -Dm644 "$src" "$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/${addonId}.xpi" ''; + inherit meta; } ); @@ -153,7 +149,7 @@ in engines = let - getIcon = url: sha256: pkgs.fetchurl { inherit url sha256; }; + getIcon = url: hash: pkgs.fetchurl { inherit url hash; }; in { "Amazon.com".metaData.hidden = true; @@ -327,8 +323,8 @@ in }; "NixOS Wiki" = { - urls = [ { template = "https://nixos.wiki/index.php?search={searchTerms}"; } ]; - icon = getIcon "https://nixos.wiki/favicon.png" "sha256-DE8IgVninF6Aq3iNMgerhvF1dpoXqDUSibtWSpf/dN4="; + urls = [ { template = "https://wiki.nixos.org/index.php?search={searchTerms}"; } ]; + icon = getIcon "https://wiki.nixos.org/favicon.ico" "sha256-88EXiL5AoP56bgteo2YXI00iK9cmd7DVg+RMbFxy6+k="; definedAliases = [ "@nixoswiki" "@nw" @@ -412,7 +408,7 @@ in }; "YouTube" = { - urls = [ { template = "https://yewtu.be/search?q={}"; } ]; + urls = [ { template = "https://yewtu.be/search?q={searchTerms}"; } ]; icon = getIcon "https://www.youtube.com/s/desktop/280a3f09/img/favicon.ico" "sha256-i7HQ+kOhdDbVndVG9vdMdtxEc13vdSLCLYAxFm24kR0="; definedAliases = [ "@youtube" @@ -450,16 +446,7 @@ in }; "0200".enable = true; "0300".enable = true; - "0400" = { - enable = true; - "0401"."browser.safebrowsing.phishing.enabled".enable = true; - "0402"."browser.safebrowsing.downloads.enabled".enable = true; - "0404" = { - "browser.safebrowsing.downloads.remote.block_potentially_unwanted".enable = true; - "browser.safebrowsing.downloads.remote.block_uncommon".enable = true; - }; - "0405"."browser.safebrowsing.allowOverride".enable = true; - }; + "0400".enable = true; "0600".enable = true; "0700" = { enable = true; @@ -468,19 +455,7 @@ in value = 5; }; }; - "0800" = { - enable = true; - "0830" = { - "browser.search.separatePrivateDefault" = { - enable = true; - value = false; - }; - "browser.search.separatePrivateDefault.ui.enabled" = { - enable = true; - value = false; - }; - }; - }; + "0800".enable = true; "0900".enable = true; "1000" = { enable = true; @@ -498,7 +473,12 @@ in "2700".enable = true; "2800" = { enable = true; - "2811"."privacy.clearOnShutdown.history".value = false; + "2811" = { + "privacy.clearOnShutdown.history".value = false; + "privacy.clearOnShutdown_v2.historyFormDataAndDownloads".value = false; + }; + "2820"."privacy.clearSiteData.historyFormDataAndDownloads".value = false; + "2830"."privacy.clearHistory.historyFormDataAndDownloads".value = false; }; "4500" = { enable = true; @@ -508,6 +488,7 @@ in "5000" = { enable = true; "5003"."signon.rememberSignons".enable = true; + "5010"."browser.urlbar.suggest.topsites".enable = true; "5017" = { "extensions.formautofill.addresses.enabled".enable = true; "extensions.formautofill.creditCards.enabled".enable = true; @@ -516,8 +497,10 @@ in }; "5500" = { enable = true; - "5508"."media.eme.enabled".enable = true; - "5508"."browser.eme.ui.enabled".enable = true; + "5508" = { + "media.eme.enabled".enable = true; + "browser.eme.ui.enabled".enable = true; + }; }; "6000".enable = true; "7000".enable = true; @@ -550,7 +533,6 @@ in "browser.toolbars.bookmarks.visibility" = "newtab"; "browser.translations.enable" = false; "browser.urlbar.decodeURLsOnCopy" = true; - "browser.urlbar.suggest.engines" = false; "browser.warnOnQuitShortcut" = false; "devtools.everOpened" = true; "doh-rollout.home-region" = "US"; diff --git a/modules/git/default.nix b/modules/git/default.nix index b32b5bc..d6e31f7 100644 --- a/modules/git/default.nix +++ b/modules/git/default.nix @@ -229,7 +229,7 @@ in '' include ${config.services.nginx.package}/conf/fastcgi_params; fastcgi_split_path_info ^(/?)(.+)$; - fastcgi_pass unix:${config.services.fcgiwrap.socketAddress}; + fastcgi_pass unix:${config.services.fcgiwrap.cgit.socket.address}; fastcgi_param SCRIPT_FILENAME ${cfg.server.package}/cgit/cgit.cgi; fastcgi_param CGIT_CONFIG ${cgitrc}; fastcgi_param PATH_INFO $uri; @@ -287,8 +287,7 @@ in ''; }; - fcgiwrap = { - enable = true; + fcgiwrap.cgit.socket = { inherit user group; }; }; diff --git a/modules/nsd.nix b/modules/nsd.nix index 9adc084..322d88a 100644 --- a/modules/nsd.nix +++ b/modules/nsd.nix @@ -58,9 +58,6 @@ in ratelimit.enable = true; zones = - let - dns = inputs.dns.lib; - in with dns.combinators; let ips = diff --git a/modules/shadowsocks.nix b/modules/shadowsocks.nix index a70e2d1..5f847be 100644 --- a/modules/shadowsocks.nix +++ b/modules/shadowsocks.nix @@ -135,7 +135,7 @@ in name = "Shadowsocks"; icon = pkgs.fetchurl { url = "https://upload.wikimedia.org/wikipedia/commons/f/f5/Shadowsocks-Logo.svg"; - sha256 = "sha256-NzGt0WQA4NQpMPsOTWgBrghuewxQeDoSe46oTm0f+BY="; + hash = "sha256-NzGt0WQA4NQpMPsOTWgBrghuewxQeDoSe46oTm0f+BY="; }; details.listen.text = ":::${toString port}"; }; diff --git a/modules/vim.nix b/modules/vim.nix index 7209e8b..ecd1336 100644 --- a/modules/vim.nix +++ b/modules/vim.nix @@ -16,6 +16,8 @@ in hm.stylix.targets.vim.enable = false; programs.vim = { + enable = true; + defaultEditor = true; package = mkIf this.isHeadful ( pkgs.vim-full.customize { name = "vim"; @@ -201,8 +203,6 @@ in }; } ); - - defaultEditor = true; }; }; } |