feat: add schizofox and add some firefox hm fixes

This commit is contained in:
jacekpoz 2023-10-14 19:19:16 +02:00
parent 01c8a12eea
commit 3b241d1223
No known key found for this signature in database
GPG key ID: 94E812A8B12AAE3C
6 changed files with 160 additions and 26 deletions

View file

@ -721,6 +721,22 @@
"type": "github"
}
},
"flake-compat_7": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
@ -764,6 +780,27 @@
"type": "github"
}
},
"flake-parts_11": {
"inputs": {
"nixpkgs-lib": [
"schizofox",
"nixpkgs"
]
},
"locked": {
"lastModified": 1696343447,
"narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_2"
@ -1291,6 +1328,27 @@
"type": "github"
}
},
"home-manager_3": {
"inputs": {
"nixpkgs": [
"schizofox",
"nixpkgs"
]
},
"locked": {
"lastModified": 1696446489,
"narHash": "sha256-xSjMKdNR+q/3hdSPyg/LUMsZT/WIoUi8dcm5zT4SMUQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "68f7d8c0fb0bfc67d1916dd7f06288424360d43a",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"hop-nvim": {
"flake": false,
"locked": {
@ -2381,6 +2439,22 @@
"type": "github"
}
},
"nmd_2": {
"flake": false,
"locked": {
"lastModified": 1687627428,
"narHash": "sha256-7zGfXuNS5RHqhpEdz2fwrtqvF86JRo5U1hrxZSYgcm8=",
"owner": "~rycee",
"repo": "nmd",
"rev": "824a380546b5d0d0eb701ff8cd5dbafb360750ff",
"type": "sourcehut"
},
"original": {
"owner": "~rycee",
"repo": "nmd",
"type": "sourcehut"
}
},
"noice-nvim": {
"flake": false,
"locked": {
@ -2932,6 +3006,7 @@
"nixpkgs": "nixpkgs_12",
"nixpkgs-wayland": "nixpkgs-wayland",
"nur": "nur",
"schizofox": "schizofox",
"shadower": "shadower",
"split-monitor-workspaces": "split-monitor-workspaces"
}
@ -3065,6 +3140,33 @@
"type": "github"
}
},
"schizofox": {
"inputs": {
"flake-compat": "flake-compat_7",
"flake-parts": "flake-parts_11",
"home-manager": "home-manager_3",
"nixpak": [
"nixpak"
],
"nixpkgs": [
"nixpkgs"
],
"nmd": "nmd_2"
},
"locked": {
"lastModified": 1696625102,
"narHash": "sha256-GNk+FZf457zBVONbDh7Rh19TnxqRO+eNv2PtLamRAZ8=",
"owner": "schizofox",
"repo": "schizofox",
"rev": "4a953104e73b69cafe464bc413ce05c48836105e",
"type": "github"
},
"original": {
"owner": "schizofox",
"repo": "schizofox",
"type": "github"
}
},
"scrollbar-nvim": {
"flake": false,
"locked": {

View file

@ -82,5 +82,13 @@
url = "github:viperML/nh";
inputs.nixpkgs.follows = "nixpkgs";
};
schizofox = {
url = "github:schizofox/schizofox";
inputs = {
nixpkgs.follows = "nixpkgs";
nixpak.follows = "nixpak";
};
};
};
}

View file

@ -335,49 +335,51 @@
btop.enable = true;
firefox = {
enable = true;
defaultSearchEngine = "NotASearx";
searchEngines = {
"NotASearx" = {
url = "https://search.notashelf.dev/search?q={searchTerms}";
favicon = "";
aliases = [ "@sx" ];
faviconUrl = "https://search.notashelf.dev/favicon.ico";
aliases = [ "!sx" ];
};
"NixOS Packages" = {
url = "https://search.nixos.org/packages?channel=unstable&query={searchTerms}";
favicon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
aliases = [ "@np" ];
faviconPath = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
aliases = [ "!np" ];
};
"NixOS Options" = {
url = "https://search.nixos.org/options?channel=unstable&query={searchTerms}";
favicon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
aliases = [ "@no" ];
faviconPath = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
aliases = [ "!no" ];
};
"NixOS Wiki" = {
url = "https://nixos.wiki/index.php?search={searchTerms}";
favicon = "";
aliases = [ "@nw" ];
faviconPath = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
aliases = [ "!nw" ];
};
"Home Manger Option Search" = {
url = "https://mipmip.github.io/home-manager-option-search?query={searchTerms}";
favicon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
aliases = [ "@hm" ];
faviconPath = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
aliases = [ "!hm" ];
};
"Arch Wiki" = {
url = "https://wiki.archlinux.org/index.php?search={searchTerms}";
favicon = "";
aliases = [ "@aw" ];
faviconUrl = "https://archlinux.org/favicon.ico";
aliases = [ "!aw" ];
};
"Gentoo Wiki" = {
url = "https://wiki.gentoo.org/index.php?search={searchTerms}";
favicon = "";
aliases = [ "@gw" ];
faviconUrl = "https://www.gentoo.org/favicon.ico";
aliases = [ "!gw" ];
};
"Debian Wiki" = {
url = "https://wiki.debian.org/FrontPage?action=fullsearch&value={searchTerms}";
favicon = "";
aliases = [ "@dw" ];
faviconUrl = "https://www.debian.org/favicon.ico";
aliases = [ "!dw" ];
};
};
};
schizofox.enable = false;
foot.enable = true;
gtklock.enable = false;
mpv.enable = true;

View file

@ -12,6 +12,7 @@ _: {
./mpv.nix
./qt.nix
#./rofi.nix
./schizofox.nix
./swaylock.nix
./waybar.nix
./zathura.nix

View file

@ -55,6 +55,10 @@
in {
options.myOptions.programs.firefox = {
enable = mkEnableOption "enable firefox";
defaultSearchEngine = mkOption {
description = "name of the default search engine";
type = types.str;
};
searchEngines = mkOption {
default = [{
url = "https://startpage.com";
@ -68,9 +72,14 @@ in {
description = "url for the search engine, params placeholder and all";
type = str;
};
favicon = mkOption {
faviconPath = mkOption {
default = "";
description = "url or path to favicon";
description = "path to favicon";
type = str;
};
faviconUrl = mkOption {
default = "";
description = "url to favicon";
type = str;
};
aliases = mkOption {
@ -123,14 +132,14 @@ in {
id = 0;
isDefault = true;
search = {
default = "${searxng-name}";
default = cfg.defaultSearchEngine;
force = true;
engines = (mapAttrs (name: value: {
${name} = {
urls = [{ template = value.url; }];
icon = if isPath value.favicon then value.favicon else "";
iconUpdateURL = if isPath value.favicon then "" else value.favicon;
updateInterval = 24 * 60 * 60 * 1000;
icon = mkIf (value.faviconPath != "") value.faviconPath;
iconUpdateURL = mkIf (value.faviconUrl != "") value.faviconUrl;
updateInterval = mkIf (value.faviconUrl != "") (24 * 60 * 60 * 1000);
definedAliases = value.aliases;
};
}) cfg.searchEngines)
@ -141,6 +150,7 @@ in {
"DuckDuckGo".metaData.hidden = true;
"Amazon.com".metaData.hidden = true;
};
order = mapAttrsToList (name: _value: name) cfg.searchEngines;
};
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin

View file

@ -12,9 +12,9 @@ in {
};
config = mkIf cfg.enable {
imports = [ inputs.schizofox.homeManagerModule ];
home-manager.users.${config'.username} = {
imports = [ inputs.schizofox.homeManagerModule ];
programs.schizofox = {
enable = true;
theme = {
@ -22,7 +22,7 @@ in {
background = "1e1e2e";
foreground = "cdd6f4";
font = "Lexend";
simplefox.enable = true;
simplefox.enable = false;
darkreader.enable = true;
extraCss = ''
body {
@ -34,7 +34,7 @@ in {
defaultSearchEngine = "Searx";
removeEngines = ["Google" "Bing" "Amazon.com" "eBay" "Twitter" "Wikipedia"];
searxUrl = "https://search.notashelf.dev";
searxQuery = "https://search.notashelf.dev/search?q={searchTerms}&categories=general";
searxQuery = "https://search.notashelf.dev/search?q={searchTerms}";
addEngines = [
{
Name = "NixOS Packages";
@ -87,6 +87,17 @@ in {
}
];
};
security = {
sanitizeOnShutdown = true;
sandbox = true;
userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0";
};
misc = {
drmFix = false;
disableWebgl = true;
};
};
};
};