Add schizofox

This commit is contained in:
ItsDrike 2024-06-10 23:01:31 +02:00
parent 1a6c2414e8
commit cff3d5ab8b
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0
6 changed files with 473 additions and 1 deletions

View file

@ -33,6 +33,28 @@
"type": "github"
}
},
"crane_2": {
"inputs": {
"nixpkgs": [
"schizofox",
"searx-randomizer",
"nixpkgs"
]
},
"locked": {
"lastModified": 1701386725,
"narHash": "sha256-w4aBlMYh9Y8co1V80m5LzEKMijUJ7CBTq209WbqVwUU=",
"owner": "ipetkov",
"repo": "crane",
"rev": "8b9bad9b30bd7a9ed08782e64846b7485f9d0a38",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
@ -49,6 +71,22 @@
"type": "github"
}
},
"flake-compat_2": {
"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": [
@ -70,6 +108,66 @@
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"nixpak",
"nixpkgs"
]
},
"locked": {
"lastModified": 1717285511,
"narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": [
"schizofox",
"nixpkgs"
]
},
"locked": {
"lastModified": 1717285511,
"narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_4": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1698882062,
"narHash": "sha256-HkhafUayIqxXyHH1X8d9RDl1M2CkFgZLjKD3MzabiEo=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "8c9fa2545007b49a5db5f650ae91f227672c3877",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
@ -90,7 +188,7 @@
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
"systems": "systems_3"
},
"locked": {
"lastModified": 1685518550,
@ -128,6 +226,58 @@
"type": "github"
}
},
"hercules-ci-effects": {
"inputs": {
"flake-parts": [
"nixpak",
"flake-parts"
],
"nixpkgs": [
"nixpak",
"nixpkgs"
]
},
"locked": {
"lastModified": 1713898448,
"narHash": "sha256-6q6ojsp/Z9P2goqnxyfCSzFOD92T3Uobmj8oVAicUOs=",
"owner": "hercules-ci",
"repo": "hercules-ci-effects",
"rev": "c0302ec12d569532a6b6bd218f698bc402e93adc",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "hercules-ci-effects",
"type": "github"
}
},
"hercules-ci-effects_2": {
"inputs": {
"flake-parts": [
"schizofox",
"nixpak",
"flake-parts"
],
"nixpkgs": [
"schizofox",
"nixpak",
"nixpkgs"
]
},
"locked": {
"lastModified": 1713898448,
"narHash": "sha256-6q6ojsp/Z9P2goqnxyfCSzFOD92T3Uobmj8oVAicUOs=",
"owner": "hercules-ci",
"repo": "hercules-ci-effects",
"rev": "c0302ec12d569532a6b6bd218f698bc402e93adc",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "hercules-ci-effects",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -148,6 +298,27 @@
"type": "github"
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
"schizofox",
"nixpkgs"
]
},
"locked": {
"lastModified": 1717097707,
"narHash": "sha256-HC5vJ3oYsjwsCaSbkIPv80e4ebJpNvFKQTBOGlHvjLs=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "0eb314b4f0ba337e88123e0b1e57ef58346aafd9",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"impermanence": {
"locked": {
"lastModified": 1717932370,
@ -190,6 +361,54 @@
"type": "github"
}
},
"nixpak": {
"inputs": {
"flake-parts": "flake-parts_2",
"hercules-ci-effects": "hercules-ci-effects",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1717865884,
"narHash": "sha256-imcv6tx4lSfffv6o8T0cIxJmgheItGSSGzxyO4cWnKg=",
"owner": "nixpak",
"repo": "nixpak",
"rev": "f938c3c01026c00a305b5fba8edeb8f7efcfb85a",
"type": "github"
},
"original": {
"owner": "nixpak",
"repo": "nixpak",
"type": "github"
}
},
"nixpak_2": {
"inputs": {
"flake-parts": [
"schizofox",
"flake-parts"
],
"hercules-ci-effects": "hercules-ci-effects_2",
"nixpkgs": [
"schizofox",
"nixpkgs"
]
},
"locked": {
"lastModified": 1717036060,
"narHash": "sha256-Bm1pBy1goxIz9PD0PRJ9ZgQzl7MQOQ6n5IB4wLNdXrA=",
"owner": "nixpak",
"repo": "nixpak",
"rev": "3a68b5453f75b1c8e5d31859a654e061a57dc059",
"type": "github"
},
"original": {
"owner": "nixpak",
"repo": "nixpak",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1717786204,
@ -206,6 +425,24 @@
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"dir": "lib",
"lastModified": 1698611440,
"narHash": "sha256-jPjHjrerhYDy3q9+s5EAsuhyhuknNfowY6yt6pjn9pc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0cbe9f69c234a7700596e943bfae7ef27a31b735",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1678872516,
@ -258,7 +495,9 @@
"home-manager": "home-manager",
"impermanence": "impermanence",
"lanzaboote": "lanzaboote",
"nixpak": "nixpak",
"nixpkgs": "nixpkgs",
"schizofox": "schizofox",
"spicetify": "spicetify"
}
},
@ -287,6 +526,55 @@
"type": "github"
}
},
"schizofox": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-parts": "flake-parts_3",
"home-manager": "home-manager_2",
"nixpak": "nixpak_2",
"nixpkgs": [
"nixpkgs"
],
"searx-randomizer": "searx-randomizer",
"systems": "systems_2"
},
"locked": {
"lastModified": 1717289290,
"narHash": "sha256-NS2WFE2mEodtPATQIC16N0ylWnog8B0IownZWnM9JPE=",
"owner": "schizofox",
"repo": "schizofox",
"rev": "04e204d8f605a45e2537343a5e467d5af0518eef",
"type": "github"
},
"original": {
"owner": "schizofox",
"repo": "schizofox",
"type": "github"
}
},
"searx-randomizer": {
"inputs": {
"crane": "crane_2",
"flake-parts": "flake-parts_4",
"nixpkgs": [
"schizofox",
"nixpkgs"
]
},
"locked": {
"lastModified": 1704412376,
"narHash": "sha256-Ap/AudJxCYBDWYy0lyqP0/FZYJCibL7jKkoj6hp1WS0=",
"owner": "schizofox",
"repo": "searx-randomizer",
"rev": "c36a473732ba6b4f6024ac1c181631cf4d542b17",
"type": "github"
},
"original": {
"owner": "schizofox",
"repo": "searx-randomizer",
"type": "github"
}
},
"spicetify": {
"inputs": {
"flake-utils": "flake-utils_2",
@ -324,6 +612,21 @@
}
},
"systems_2": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",

View file

@ -18,10 +18,25 @@
inputs.nixpkgs.follows = "nixpkgs";
};
# Spotify + themes
spicetify = {
url = "github:the-argus/spicetify-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# Sandbox wrappers for programs
nixpak = {
url = "github:nixpak/nixpak";
inputs.nixpkgs.follows = "nixpkgs";
};
# Schizophrenic Firefox
schizofox = {
url = "github:schizofox/schizofox";
inputs = {
nixpkgs.follows = "nixpkgs";
};
};
};
outputs = {self, nixpkgs, ...} @ inputs: let

View file

@ -2,6 +2,7 @@ _: {
imports = [
./chromium
./mullvad
./schizofox
];
}

View file

@ -0,0 +1,151 @@
{
lib,
osConfig,
inputs,
pkgs,
...
}: let
inherit (lib) mkIf;
cfg = osConfig.myOptions.home-manager.programs.browsers.schizofox;
in {
imports = [inputs.schizofox.homeManagerModule];
config = mkIf cfg.enable {
programs.schizofox = {
enable = true;
theme = {
font = "Inter";
colors = {
background-darker = "181825";
background = "1e1e2e";
foreground = "cdd6f4";
};
extraUserChrome = ''
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
/* full screen toolbars */
#navigator-toolbox[inFullscreen] toolbar:not([collapsed="true"]) {
visibility:visible!important;
}
'';
};
search = {
defaultSearchEngine = "Brave";
removeEngines = [ "Bing" "Amazon.com" "eBay" "Twitter" "Wikipedia" "LibRedirect" ];
searxUrl = "https://searx.be";
searxQuery = "https://searx.be/search?q={searchTerms}&categories=general";
addEngines = [
{
Name = "Brave";
Description = "Brave search";
Alias = "!brave";
Method = "GET";
URLTemplate = "https://search.brave.com/search?q={searchTerms}";
}
{
Name = "NixOS Packages";
Description = "NixOS Unstable package search";
Alias = "!np";
Method = "GET";
URLTemplate = "https://search.nixos.org/packages?channel=unstable&query={searchTerms}";
}
{
Name = "NixOS Options";
Description = "NixOS Unstable option search";
Alias = "!no";
Method = "GET";
URLTemplate = "https://search.nixos.org/options?channel=unstable&query={searchTerms}";
}
{
Name = "NixOS Wiki";
Description = "NixOS Wiki search";
Alias = "!nw";
Method = "GET";
URLTemplate = "https://nixos.wiki/index.php?search={searchTerms}";
}
{
Name = "Home Manager Options";
Description = "Home Manager option search";
Alias = "!hm";
Method = "GET";
URLTemplate = "https://mipmip.github.io/home-manager-option-search?query={searchTerms}";
}
{
Name = "MyNixOS";
Description = "All-In-One NixOS Search (options (including home-manager), packages, categories, flakes) ";
Alias = "!nn";
Method = "GET";
URLTemplate = "https://mynixos.com/search?q={searchTerms}";
}
{
Name = "Arch Wiki";
Description = "Arch Wiki search";
Alias = "!aw";
Method = "GET";
URLTemplate = "https://wiki.archlinux.org/index.php?search={searchTerms}";
}
{
Name = "Gentoo Wiki";
Description = "Gentoo Wiki search";
Alias = "!gw";
Method = "GET";
URLTemplate = "https://wiki.gentoo.org/index.php?search={searchTerms}";
}
{
Name = "Debian Wiki";
Description = "Debian Wiki search";
Alias = "!dw";
Method = "GET";
URLTemplate = "https://wiki.debian.org/FrontPage?action=fullsearch&value={searchTerms}";
}
];
};
security = {
sanitizeOnShutdown = false; # TODO: check
sandbox = true;
noSessionRestore = false; # TODO: check
userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0";
};
misc = {
drm.enable = true;
disableWebgl = false;
};
extensions = {
simplefox.enable = false; # simplified UI, keyboard controled
darkreader.enable = true;
extraExtensions = let
mkUrl = name: "https://addons.mozilla.org/firefox/downloads/latest/${name}/latest.xpi";
extensions = [
{
id = "{c2c003ee-bd69-42a2-b0e9-6f34222cb046}";
name = "auto-tab-discard";
}
{
id = "sponsorBlocker@ajay.app";
name = "sponsorblock";
}
{
id = "{446900e4-71c2-419f-a6a7-df9c091e268b}";
name = "bitwarden-password-manager";
}
{
id = "{9f043cd9-bcc0-4ea0-9407-9e6274c2182d}";
name = "videospeed";
}
];
extraExtensions = builtins.foldl' (acc: ext: acc // {ext.id = { install_url = mkUrl ext.name;};}) {} extensions;
in extraExtensions;
};
};
};
}

View file

@ -98,6 +98,7 @@
browsers = {
chromium.enable = true;
mullvad-browser.enable = true;
schizofox.enable = true;
};
spotify.enable = true;

View file

@ -22,6 +22,7 @@ in
browsers = {
chromium.enable = mkEnableOption "Chromium browser";
mullvad-browser.enable = mkEnableOption "Mullvad browser";
schizofox.enable = mkEnableOption "Schizophrenic version of Firefox browser";
};
spotify.enable = mkEnableOption "Spotify";