diff options
Diffstat (limited to 'mixins')
-rw-r--r-- | mixins/cli.nix | 2 | ||||
-rw-r--r-- | mixins/firefox/absolute-minimum.nix | 228 | ||||
-rw-r--r-- | mixins/firefox/minimum/addons-passthru.patch (renamed from mixins/firefox/addons-passthru.patch) | 0 | ||||
-rw-r--r-- | mixins/firefox/minimum/default.nix | 414 | ||||
-rw-r--r-- | mixins/firefox/minimum/simplefox.css | 205 | ||||
-rw-r--r-- | mixins/firefox/schizo.nix | 80 | ||||
-rw-r--r-- | mixins/multimedia.nix | 6 | ||||
-rw-r--r-- | mixins/sway.nix | 69 |
8 files changed, 723 insertions, 281 deletions
diff --git a/mixins/cli.nix b/mixins/cli.nix index ba48fd7..db81d4b 100644 --- a/mixins/cli.nix +++ b/mixins/cli.nix @@ -18,7 +18,7 @@ ripgrep bat jq - file + file # p2p file transfer croc diff --git a/mixins/firefox/absolute-minimum.nix b/mixins/firefox/absolute-minimum.nix deleted file mode 100644 index d3ebe98..0000000 --- a/mixins/firefox/absolute-minimum.nix +++ /dev/null @@ -1,228 +0,0 @@ -let - profile = "default"; - prf = ".mozilla/firefox/${profile}"; - extstorage = "${prf}/browser-extension-data"; -in - { - config, - inputs, - pkgs, - lib, - ... - }: { - home-manager.users.tzlil = let - firefox-addons = pkgs.callPackage (pkgs.applyPatches { - src = inputs.firefox-addons; - patches = [./addons-passthru.patch]; - name = "firefox-addons-patched"; - }) {}; - mozlz4 = n: x: - pkgs.runCommand "${n}.lz4" {buildInputs = [pkgs.mozlz4a];} '' - mozlz4a ${pkgs.writeTextFile { - name = n; - text = builtins.toJSON x; - }} $out - ''; - cfg = config.home-manager.users.tzlil.programs; - addons = cfg.firefox.profiles.${profile}.extensions; - extensionPath = "extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"; - - firefoxData = - pkgs.runCommand "firefox-default-profile" { - buildInputs = [ - pkgs.xvfb-run - (pkgs.firefox.override { - extraPolicies = { - Extensions.Install = map (x: x.src.outPath) addons; - ExtensionSettings = { - "google@search.mozilla.org" = {installation_mode = "blocked";}; - "amazondotcom@search.mozilla.org" = {installation_mode = "blocked";}; - "wikipedia@search.mozilla.org" = {installation_mode = "blocked";}; - "bing@search.mozilla.org" = {installation_mode = "blocked";}; - }; - }; - }) - ]; - } '' - HOME=$(mktemp -d) - export FONTCONFIG_FILE=${pkgs.makeFontsConf {fontDirectories = [pkgs.roboto];}} - mkdir -p $HOME/.mozilla/firefox/ - mkdir $out - ln -s $out $HOME/.mozilla/firefox/default - cat >> $HOME/.mozilla/firefox/profiles.ini<< EOF - [Profile0] - Default=1 - IsRelative=1 - Name=default - Path=default - EOF - - echo user_pref\(\"browser.region.network.url\", \"\"\)\; > $HOME/.mozilla/firefox/default/user.js - - xvfb-run firefox --screenshot about:blank --headless - - # cat $HOME/.mozilla/firefox/default/extensions.json > $out - # - ''; - extensionsData = "${firefoxData}/extensions.json"; - - # addonStartup = builtins.fromJSON (builtins.unsafeDiscardStringContext (builtins.readFile (pkgs.runCommand "addonStartup.json" { - # buildInputs = [ - # pkgs.mozlz4a - # pkgs.jq - # ]; - # } - # '' - # mozlz4a -d ${firefoxData}/addonStartup.json.lz4 /dev/stdout | jq . > $out - # ''))); - - # decrappedAddonStartup = lib.attrsets.updateManyAttrsByPath [ - # { - # path = ["app-builtin" "addons" "google@search.mozilla.org" "enable"]; - # update = old: false; - # } - # ] addonStartup; - - extensionManifest = e: - builtins.fromJSON (builtins.readFile (pkgs.runCommand "${e.addonId}-manifest.json" {buildInputs = [pkgs.p7zip];} '' - 7z x -so ${e.src.outPath} manifest.json > $out - '')); - in { - # these come from the HM module - home.file."${prf}/extension-preferences.json".source = pkgs.emptyFile; - home.file."${prf}/extension-preferences.json.tmp".source = pkgs.emptyFile; - - home.file."${prf}/extension-settings.json".source = pkgs.emptyFile; - home.file."${prf}/extension-settings.json.tmp".source = pkgs.emptyFile; - - # home.file."${prf}/search.json.mozlz4".source = pkgs.emptyFile; - home.file."${prf}/search.json.mozlz4.tmp".source = pkgs.emptyFile; - - home.file."${prf}/extensions".source = lib.mkForce "${pkgs.symlinkJoin { - name = "extensions"; - paths = addons; - }}/share/mozilla/${extensionPath}"; - - home.file."${prf}/storage".source = pkgs.emptyDirectory; - home.file."${prf}/crashes".source = pkgs.emptyDirectory; - home.file."${prf}/datareporting".source = pkgs.emptyDirectory; - home.file."${prf}/saved-telemetry-pings".source = pkgs.emptyDirectory; - - # home.file."${prf}/addonStartup.json.lz4".source = mozlz4 "addonStartup.json" (lib.attrsets.updateManyAttrsByPath [ - # { - # path = ["app-builtin" "addons" "google@search.mozilla.org" "enable"]; - # update = old: false; - # } - # ] addonStartup); - home.file."${prf}/addonStartup.json.lz4".source = pkgs.emptyFile; - home.file."${prf}/addonStartup.json.lz4.tmp".source = pkgs.emptyFile; - - home.file."${prf}/addons.json".source = pkgs.emptyFile; - home.file."${prf}/addons.json.tmp".source = pkgs.emptyFile; - - home.file."${prf}/extensions.json".source = extensionsData; - # home.file."${prf}/extensions.json".text = builtins.toJSON { - # schemaVersion = 35; - # addons = - # map (x: { - # active = true; - # appDisabled = false; - # defaultLocale = {}; - # embedderDisabled = false; - # foreignInstall = true; - # hidden = false; - # id = x.addonId; - # location = "app-profile"; - # manifestVersion = (extensionManifest x).manifest_version; - # optionalPermissions = { - # permissions = (extensionManifest x).optional_permissions or []; - # origins = (extensionManifest x).optional_permissions or []; - # }; - # path = x.src.outPath; - # rootURI = "jar:file://${x.src.outPath}!/"; - # softDisabled = false; - # type = "extension"; - # userDisabled = false; - # userPermissions = { - # permissions = (extensionManifest x).permissions or []; - # origins = (extensionManifest x).permissions or []; - # }; - # version = (extensionManifest x).version; - # }) - # addons; - # }; - home.file."${prf}/extensions.json.tmp".source = pkgs.emptyFile; - - # tries to access W_OK it forever - # home.file."${prf}/prefs.js".source = pkgs.emptyFile; - # home.file."${prf}/prefs-1.js".source = pkgs.emptyFile; - - programs.firefox = { - enable = true; - package = pkgs.firefox-wayland.override { - extraPolicies = { - CaptivePortal = false; - DisableFirefoxStudies = true; - DisablePocket = true; - DisableTelemetry = true; - DisableFirefoxAccounts = true; - FirefoxHome = { - Pocket = false; - Snippets = false; - }; - UserMessaging = { - ExtensionRecommendations = false; - SkipOnboarding = true; - }; - SearchEngines.Default = "DuckDuckGo"; - ExtensionSettings = { - "google@search.mozilla.org" = {installation_mode = "blocked";}; - "amazondotcom@search.mozilla.org" = {installation_mode = "blocked";}; - "wikipedia@search.mozilla.org" = {installation_mode = "blocked";}; - "bing@search.mozilla.org" = {installation_mode = "blocked";}; - }; - }; - }; - profiles.${profile} = { - userChrome = builtins.readFile ./userChrome.css; - search = { - default = "DuckDuckGo"; - force = true; - }; - extensions = with firefox-addons; [ - kristofferhagen-nord-theme - - ublock-origin - clearurls - privacy-possum - skip-redirect - canvasblocker - - sidebery - ]; - settings = { - "extensions.activeThemeID" = "{e410fec2-1cbd-4098-9944-e21e708418af}"; - - # (try to) hide crap - "browser.search.hiddenOneOffs" = "Google,Bing,Amazon.com,eBay,Twitter,Wikipedia (en)"; - "browser.newtabpage.activity-stream.showSponsored" = false; - "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; - "services.sync.prefs.sync.browser.newtabpage.activity-stream.showSponsored" = false; - "services.sync.prefs.sync.browser.newtabpage.activity-stream.showSponsoredTopSites" = false; - "browser.newtabpage.activity-stream.default.sites" = ""; - "browser.urlbar.suggest.topsites" = false; - "browser.newtabpage.activity-stream.feeds.topsites" = false; - - # disable welcome page - "browser.aboutwelcome.enabled" = false; - # disable privacy notice - "datareporting.policy.firstRunURL" = ""; - # "browser.newtabpage.activity-stream.aboutHome.enabled" = false; - }; - # extraConfig = { - - # }; - }; - }; - }; - } diff --git a/mixins/firefox/addons-passthru.patch b/mixins/firefox/minimum/addons-passthru.patch index 6bd149d..6bd149d 100644 --- a/mixins/firefox/addons-passthru.patch +++ b/mixins/firefox/minimum/addons-passthru.patch diff --git a/mixins/firefox/minimum/default.nix b/mixins/firefox/minimum/default.nix new file mode 100644 index 0000000..8ecf48a --- /dev/null +++ b/mixins/firefox/minimum/default.nix @@ -0,0 +1,414 @@ +let + profile = "default"; + prf = ".mozilla/firefox/${profile}"; + extstorage = "${prf}/browser-extension-data"; +in + { + config, + inputs, + pkgs, + lib, + ... + }: { + home-manager.users.tzlil = let + firefox-addons = pkgs.callPackage (pkgs.applyPatches { + src = inputs.firefox-addons; + patches = [./addons-passthru.patch]; + name = "firefox-addons-patched"; + }) {}; + mozlz4 = n: x: + pkgs.runCommand "${n}.lz4" {buildInputs = [pkgs.mozlz4a];} '' + mozlz4a ${pkgs.writeTextFile { + name = n; + text = builtins.toJSON x; + }} $out + ''; + cfg = config.home-manager.users.tzlil.programs; + addons = cfg.firefox.profiles.${profile}.extensions; + extensionPath = "extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"; + + firefoxData = + pkgs.runCommand "firefox-default-profile" { + buildInputs = [ + pkgs.xvfb-run + (pkgs.firefox.override { + extraPolicies = { + Extensions.Install = map (x: x.src.outPath) addons; + ExtensionSettings = { + "google@search.mozilla.org" = {installation_mode = "blocked";}; + "amazondotcom@search.mozilla.org" = {installation_mode = "blocked";}; + "wikipedia@search.mozilla.org" = {installation_mode = "blocked";}; + "bing@search.mozilla.org" = {installation_mode = "blocked";}; + }; + }; + }) + ]; + } '' + HOME=$(mktemp -d) + export FONTCONFIG_FILE=${pkgs.makeFontsConf {fontDirectories = [pkgs.roboto];}} + mkdir -p $HOME/.mozilla/firefox/ + mkdir $out + ln -s $out $HOME/.mozilla/firefox/default + cat >> $HOME/.mozilla/firefox/profiles.ini<< EOF + [Profile0] + Default=1 + IsRelative=1 + Name=default + Path=default + EOF + + echo user_pref\(\"browser.region.network.url\", \"\"\)\; > $HOME/.mozilla/firefox/default/user.js + + xvfb-run firefox --screenshot about:blank --headless + + # cat $HOME/.mozilla/firefox/default/extensions.json > $out + # + ''; + # extensionsData = "${firefoxData}/extensions.json"; + + # addonStartup = pkgs.runCommand "addonStartup.json" { + # buildInputs = [ + # pkgs.mozlz4a + # pkgs.jq + # ]; + # } + # '' + # mozlz4a -d ${firefoxData}/addonStartup.json.lz4 /dev/stdout | jq . > $out + # ''; + + # decrappedAddonStartup = lib.attrsets.updateManyAttrsByPath [ + # { + # path = ["app-builtin" "addons" "google@search.mozilla.org" "enable"]; + # update = old: false; + # } + # ] addonStartup; + + extensionManifest = e: + builtins.fromJSON (builtins.readFile (pkgs.runCommand "${e.addonId}-manifest.json" {buildInputs = [pkgs.p7zip];} '' + 7z x -so ${e.src.outPath} manifest.json > $out + '')); + in { + # these come from the HM module + home.file."${prf}/extension-preferences.json".source = pkgs.emptyFile; + home.file."${prf}/extension-preferences.json.tmp".source = pkgs.emptyFile; + + home.file."${prf}/extension-settings.json".source = pkgs.emptyFile; + home.file."${prf}/extension-settings.json.tmp".source = pkgs.emptyFile; + + home.file."${prf}/search.json.mozlz4".source = mozlz4 "search.json.mozlz4" { + engines = [ + { + _isAppProvided = true; + _metaData = {hidden = true;}; + _name = "Google"; + id = "google@search.mozilla.orgdefault"; + } + { + _isAppProvided = true; + _metaData = {hidden = true;}; + _name = "Amazon.com"; + id = "amazondotcom@search.mozilla.orgdefault"; + } + { + _isAppProvided = true; + _metaData = {hidden = true;}; + _name = "Wikipedia (en)"; + id = "wikipedia@search.mozilla.orgdefault"; + } + { + _isAppProvided = true; + _metaData = {hidden = true;}; + _name = "Bing"; + id = "bing@search.mozilla.orgdefault"; + } + { + _isAppProvided = true; + _metaData = {hidden = true;}; + _name = "DuckDuckGo"; + id = "ddg@search.mozilla.orgdefault"; + } + { + __searchForm = "https://kagi.com/"; + _definedAliases = []; + _iconMapObj = {"{\"width\":48,\"height\":48}" = "data:image/vnd.microsoft.icon;base64,AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAABMLAAATCwAAAAAAAAAAAAAAAAAAGbL/ABiy/w8Zsv9fGbP/vhmz//AZs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///G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mz//8Zs///GbP//xmz//8Zs///GbP//xmz//AZs/++GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8ZtP7/GZbT/xlbe/8ZPU//GTtM/xl/sf8Ztf//GbP//xmz//8Zs///GbP//xmz//8Zs///GbP/wBmz/18Zs//zGbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Ztf//GbL9/xms9f8Zq/P/GbD6/xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//MZs/9kGLL/Dxmz/54Zs//+GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs//+GbP/mxmz/wwZtP8AGrT/GBmz/5sZs//0GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP/9Bmz/50atP8YGbT/AAAAAAAYsv8AGLH/DRmz/2QZs//BGbP/8Rmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP/8Bmz/74Zs/9fGLT/Dxmz/wAAAAAAwAAAA4AAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAcAAAAM=";}; + _iconURL = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAURJREFUOE+dk79LAzEcxT+B0goKIih64k9wcxHBzVE66aarY4uHoIMUl8NBK4iLxSq0CP4HRdqlUGdxEx2KIFRBa9VBRBDUFk/Cedgjd95hliTkvZf3fclXAJgFbQdYkuvAQ5AV07W4MPNaBkEsMNEJTAmzoJl+5MojTBrQGoGrXSfaU+D4AubTTnBggWEdPhpOciQE1/uqV8XBwwuMJyzgfdaae38SOknCUJdPCWMr8PT6S5bwegMGdehuh7NtH4GJVag+Q8mA0X4LXL6FqXUY6ITTTR+BLxP64hboUIe3T1g8cJbULKFksFeEZE4NayEKxmyAEO3AZIBbR/Beh7U575+iOLAFKmkQwiLKORxyF/EUcIPbz/pnBvIwloHLKoz0QEcbnN9A+c49SOkgUCdGNyCfgJZw0/2yI+X2nx2ZEjO15W8/wHRJmDJVowAAAABJRU5ErkJggg=="; + _iconUpdateURL = null; + _loadPath = "[https]kagi.com/kagi.xml"; + _metaData = { + loadPathHash = "UtVcODv+iDIE7YbKsRgmcuEtoupCFvV7xIfe+lM7oDs="; + order = 6; + }; + _name = "Kagi"; + _orderHint = null; + _telemetryId = null; + _updateInterval = null; + _updateURL = null; + _urls = [ + { + params = []; + rels = ["results"]; + template = "https://kagi.com/search?q={searchTerms}"; + } + { + params = []; + rels = ["suggestions"]; + template = "https://kagi.com/api/autosuggest?q={searchTerms}"; + type = "application/x-suggestions+json"; + } + ]; + description = "A privacy-focused, user-centric search engine."; + id = "de6311b3-e1df-456e-bc42-73f88ffcd9eb"; + } + { + __searchForm = "https://search.nixos.org/"; + _definedAliases = ["!np"]; + # _iconMapObj = {"{\"width\":48,\"height\":48}" = "data:image/vnd.microsoft.icon;base64,AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAABMLAAATCwAAAAAAAAAAAAAAAAAAGbL/ABiy/w8Zsv9fGbP/vhmz//AZs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//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8Zs///GbP//xmz//AZs/++GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8ZtP7/GZbT/xlbe/8ZPU//GTtM/xl/sf8Ztf//GbP//xmz//8Zs///GbP//xmz//8Zs///GbP/wBmz/18Zs//zGbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Ztf//GbL9/xms9f8Zq/P/GbD6/xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//MZs/9kGLL/Dxmz/54Zs//+GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs//+GbP/mxmz/wwZtP8AGrT/GBmz/5sZs//0GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP/9Bmz/50atP8YGbT/AAAAAAAYsv8AGLH/DRmz/2QZs//BGbP/8Rmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP//xmz//8Zs///GbP/8Bmz/74Zs/9fGLT/Dxmz/wAAAAAAwAAAA4AAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAcAAAAM=";}; + # _iconURL = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAURJREFUOE+dk79LAzEcxT+B0goKIih64k9wcxHBzVE66aarY4uHoIMUl8NBK4iLxSq0CP4HRdqlUGdxEx2KIFRBa9VBRBDUFk/Cedgjd95hliTkvZf3fclXAJgFbQdYkuvAQ5AV07W4MPNaBkEsMNEJTAmzoJl+5MojTBrQGoGrXSfaU+D4AubTTnBggWEdPhpOciQE1/uqV8XBwwuMJyzgfdaae38SOknCUJdPCWMr8PT6S5bwegMGdehuh7NtH4GJVag+Q8mA0X4LXL6FqXUY6ITTTR+BLxP64hboUIe3T1g8cJbULKFksFeEZE4NayEKxmyAEO3AZIBbR/Beh7U575+iOLAFKmkQwiLKORxyF/EUcIPbz/pnBvIwloHLKoz0QEcbnN9A+c49SOkgUCdGNyCfgJZw0/2yI+X2nx2ZEjO15W8/wHRJmDJVowAAAABJRU5ErkJggg=="; + _iconURL = "file://${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + _iconUpdateURL = null; + # _loadPath = "[https]kagi.com/kagi.xml"; + _metaData = { + # loadPathHash = "UtVcODv+iDIE7YbKsRgmcuEtoupCFvV7xIfe+lM7oDs="; + order = 7; + }; + _name = "nixpkgs"; + _orderHint = null; + _telemetryId = null; + _updateInterval = null; + _updateURL = null; + _urls = [ + { + params = []; + rels = ["results"]; + template = "https://search.nixos.org/packages?query={searchTerms}"; + } + ]; + description = "nixpkgs"; + id = "229feefe-acd1-47ac-87e1-11373a6608b5"; + } + ]; + metaData = { + appDefaultEngineId = "google@search.mozilla.orgdefault"; + channel = "default"; + defaultEngineId = "de6311b3-e1df-456e-bc42-73f88ffcd9eb"; + defaultEngineIdHash = "G2Ce4is1f2X6BdVBEv3KgHQDQPdU4JHhPKU9dJz7uPU="; + distroID = "nixos"; + experiment = ""; + locale = "en-US"; + region = "IL"; + useSavedOrder = true; + }; + version = 9; + }; + home.file."${prf}/search.json.mozlz4.tmp".source = pkgs.emptyFile; + + home.file."${prf}/extensions".source = lib.mkForce "${pkgs.symlinkJoin { + name = "extensions"; + paths = addons; + }}/share/mozilla/${extensionPath}"; + + home.file."${extstorage}/redirector@einaregilsson.com/storage.js".text = builtins.toJSON { + redirects = + map ({ + includePattern, + redirectUrl, + description, + }: { + appliesTo = ["main_frame"]; + inherit description; + disabled = false; + error = null; + exampleResult = ""; + exampleUrl = ""; + excludePattern = ""; + grouped = false; + inherit includePattern; + patternDesc = ""; + patternType = "W"; + processMatches = "noProcessing"; + inherit redirectUrl; + }) [ + { + includePattern = "https://*youtube.com/watch?*v=*"; + redirectUrl = "https://yewtu.be/watch?$2v=$3"; + description = "invidious"; + } + { + includePattern = "https://*youtube.com/results?*search_query=*"; + redirectUrl = "https://yewtu.be/search?$2q=$3"; + description = "invidious search"; + } + ]; + enableNotifications = false; + }; + + home.file."${prf}/crashes".source = pkgs.emptyDirectory; + home.file."${prf}/datareporting".source = pkgs.emptyDirectory; + home.file."${prf}/saved-telemetry-pings".source = pkgs.emptyDirectory; + + # home.file."${prf}/addonStartup.json.lz4".source = "${firefoxData}/addonStartup.json.lz4"; + # home.file."${prf}/addonStartup.json.lz4.tmp".source = pkgs.emptyFile; + + home.file."${prf}/addons.json".source = pkgs.emptyFile; + home.file."${prf}/addons.json.tmp".source = pkgs.emptyFile; + + # home.file."${prf}/extensions.json".source = extensionsData; + # home.file."${prf}/extensions.json".text = builtins.toJSON { + # schemaVersion = 35; + # addons = + # map (x: { + # active = true; + # appDisabled = false; + # defaultLocale = {}; + # embedderDisabled = false; + # foreignInstall = true; + # hidden = false; + # id = x.addonId; + # location = "app-profile"; + # manifestVersion = (extensionManifest x).manifest_version; + # optionalPermissions = { + # permissions = (extensionManifest x).optional_permissions or []; + # origins = (extensionManifest x).optional_permissions or []; + # }; + # path = x.src.outPath; + # rootURI = "jar:file://${x.src.outPath}!/"; + # softDisabled = false; + # type = "extension"; + # userDisabled = false; + # userPermissions = { + # permissions = (extensionManifest x).permissions or []; + # origins = (extensionManifest x).permissions or []; + # }; + # version = (extensionManifest x).version; + # }) + # addons; + # }; + # home.file."${prf}/extensions.json.tmp".source = pkgs.emptyFile; + + # tries to access W_OK it forever + # home.file."${prf}/prefs.js".source = pkgs.emptyFile; + + # home.file."${prf}/prefs-1.js".source = pkgs.emptyFile; + + programs.firefox = { + enable = true; + package = pkgs.firefox-wayland.override { + extraPolicies = { + CaptivePortal = false; + DisableFirefoxStudies = true; + DisablePocket = true; + DisableTelemetry = true; + DisableFirefoxAccounts = true; + FirefoxHome = { + Pocket = false; + Snippets = false; + }; + UserMessaging = { + ExtensionRecommendations = false; + SkipOnboarding = true; + }; + SearchEngines.Default = "Kagi"; + Extensions.Install = map (x: x.src.outPath) addons; + ExtensionSettings = { + # "google@search.mozilla.org" = {installation_mode = "blocked";}; + # "amazondotcom@search.mozilla.org" = {installation_mode = "blocked";}; + # "wikipedia@search.mozilla.org" = {installation_mode = "blocked";}; + # "bing@search.mozilla.org" = {installation_mode = "blocked";}; + "{3c078156-979c-498b-8990-85f7987dd929}" = {installation_mode = "force_installed";}; + }; + }; + }; + profiles.${profile} = { + userChrome = + builtins.readFile ./simplefox.css + + '' + /* hide top tabs */ + #TabsToolbar { + visibility: collapse !important; + margin-bottom: 21px !important; + } + #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header { + visibility: collapse !important; + } + + /* + * Bookmarks toolbar is visible only on new tab page, just like Chrome. + */ + + #main-window #PersonalToolbar { + visibility: collapse !important; + } + + #main-window[title^="about:newtab"] #PersonalToolbar, + #main-window[title^="New Tab"] #PersonalToolbar, + #main-window[title^="Nightly"] #PersonalToolbar, + #main-window[title^="Mozilla Firefox"] #PersonalToolbar, + #main-window[title^="Firefox"] #PersonalToolbar, + #main-window[title^="新标签页"] #PersonalToolbar, + #main-window[title^="Customize Firefox"] #PersonalToolbar { + visibility: visible !important; + } + ''; + extensions = with firefox-addons; [ + # ublock-origin + # clearurls + # privacy-possum + # skip-redirect + # canvasblocker + i-dont-care-about-cookies + darkreader + (firefox-addons.buildFirefoxXpiAddon { + pname = "sidebery"; + version = "v5.0.0rc4"; + addonId = "{3c078156-979c-498b-8990-85f7987dd929}"; + url = "https://github.com/mbnuqw/sidebery/releases/download/v5.0.0rc4/sidebery-5.0.0rc4.xpi"; + sha256 = "sha256-YsH9yYfGefClRS93dMV/eLMFuoPFKPrx0NL2hIv4dEk="; + meta = with lib; { + homepage = "https://github.com/mbnuqw/sidebery"; + description = "Tabs tree and bookmarks in sidebar with advanced containers configuration."; + license = licenses.mit; + platforms = platforms.all; + }; + }) + sidebery + redirector + ublock-origin + keepassxc-browser + ]; + settings = { + "extensions.activeThemeID" = "{e410fec2-1cbd-4098-9944-e21e708418af}"; + + # (try to) hide crap + "browser.search.hiddenOneOffs" = "Google,Bing,Amazon.com,eBay,Twitter,Wikipedia (en)"; + "browser.newtabpage.activity-stream.showSponsored" = false; + "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; + "services.sync.prefs.sync.browser.newtabpage.activity-stream.showSponsored" = false; + "services.sync.prefs.sync.browser.newtabpage.activity-stream.showSponsoredTopSites" = false; + "browser.newtabpage.activity-stream.default.sites" = ""; + "browser.urlbar.suggest.topsites" = false; + "browser.newtabpage.activity-stream.feeds.topsites" = false; + + # disable welcome page + "browser.aboutwelcome.enabled" = false; + # disable privacy notice + "datareporting.policy.firstRunURL" = ""; + # "browser.newtabpage.activity-stream.aboutHome.enabled" = false; + + #simplefox + "toolkit.legacyUserProfileCustomizations.stylesheets" = true; + "layers.acceleration.force-enabled" = true; + "gfx.webrender.all" = true; + "svg.context-properties.content.enabled" = true; + + "signon.rememberSignons" = false; + }; + # extraConfig = { + + # }; + }; + }; + }; + environment.persistence."/nix/persist".users.tzlil.directories = [ + "${extstorage}/keepassxc-browser@keepassxc.org" + ]; + } diff --git a/mixins/firefox/minimum/simplefox.css b/mixins/firefox/minimum/simplefox.css new file mode 100644 index 0000000..08a8f93 --- /dev/null +++ b/mixins/firefox/minimum/simplefox.css @@ -0,0 +1,205 @@ +/* +┌─┐┬┌┬┐┌─┐┬ ┌─┐ +└─┐││││├─┘│ ├┤ +└─┘┴┴ ┴┴ ┴─┘└─┘ +┌─┐┌─┐─┐ ┬ +├┤ │ │┌┴┬┘ +└ └─┘┴ └─ + +by Miguel Avila + +*/ + +/* + +┌─┐┌─┐┌┐┌┌─┐┬┌─┐┬ ┬┬─┐┌─┐┌┬┐┬┌─┐┌┐┌ +│ │ ││││├┤ ││ ┬│ │├┬┘├─┤ │ ││ ││││ +└─┘└─┘┘└┘└ ┴└─┘└─┘┴└─┴ ┴ ┴ ┴└─┘┘└┘ + +*/ + +:root { + --sfwindow: #19171a; + --sfsecondary: #201e21; + } + + /* Urlbar View */ + + /*─────────────────────────────*/ + /* Comment this section if you */ + /* want to show the URL Bar */ + /*─────────────────────────────*/ + + .urlbarView { + display: none !important; + } + + /*─────────────────────────────*/ + + /* + ┌─┐┌─┐┬ ┌─┐┬─┐┌─┐ + │ │ ││ │ │├┬┘└─┐ + └─┘└─┘┴─┘└─┘┴└─└─┘ + */ + + /* Tabs colors */ + #tabbrowser-tabs:not([movingtab]) + > #tabbrowser-arrowscrollbox + > .tabbrowser-tab + > .tab-stack + > .tab-background[multiselected='true'], + #tabbrowser-tabs:not([movingtab]) + > #tabbrowser-arrowscrollbox + > .tabbrowser-tab + > .tab-stack + > .tab-background[selected='true'] { + background-image: none !important; + background-color: var(--toolbar-bgcolor) !important; + } + + /* Inactive tabs color */ + #navigator-toolbox { + background-color: var(--sfwindow) !important; + } + + /* Window colors */ + :root { + --toolbar-bgcolor: var(--sfsecondary) !important; + --tabs-border-color: var(--sfsecondary) !important; + --lwt-sidebar-background-color: var(--sfwindow) !important; + --lwt-toolbar-field-focus: var(--sfsecondary) !important; + } + + /* Sidebar color */ + #sidebar-box, + .sidebar-placesTree { + background-color: var(--sfwindow) !important; + } + + /* + + ┌┬┐┌─┐┬ ┌─┐┌┬┐┌─┐ + ││├┤ │ ├┤ │ ├┤ + ─┴┘└─┘┴─┘└─┘ ┴ └─┘ + ┌─┐┌─┐┌┬┐┌─┐┌─┐┌┐┌┌─┐┌┐┌┌┬┐┌─┐ + │ │ ││││├─┘│ ││││├┤ │││ │ └─┐ + └─┘└─┘┴ ┴┴ └─┘┘└┘└─┘┘└┘ ┴ └─┘ + + */ + + /* Tabs elements */ + .tab-close-button { + display: none; + } + + .tabbrowser-tab:not([pinned]) .tab-icon-image { + display: none !important; + } + + #nav-bar:not([tabs-hidden='true']) { + box-shadow: none; + } + + #tabbrowser-tabs[haspinnedtabs]:not([positionpinnedtabs]) + > #tabbrowser-arrowscrollbox + > .tabbrowser-tab[first-visible-unpinned-tab] { + margin-inline-start: 0 !important; + } + + :root { + --toolbarbutton-border-radius: 0 !important; + --tab-border-radius: 0 !important; + --tab-block-margin: 0 !important; + } + + .tab-background { + border-right: 0px solid rgba(0, 0, 0, 0) !important; + margin-left: -4px !important; + } + + .tabbrowser-tab:is([visuallyselected='true'], [multiselected]) + > .tab-stack + > .tab-background { + box-shadow: none !important; + } + + .tabbrowser-tab[last-visible-tab='true'] { + padding-inline-end: 0 !important; + } + + #tabs-newtab-button { + padding-left: 0 !important; + } + + /* Url Bar */ + #urlbar-input-container { + background-color: var(--sfsecondary) !important; + border: 1px solid rgba(0, 0, 0, 0) !important; + } + + #urlbar-container { + margin-left: 0 !important; + } + + #urlbar[focused='true'] > #urlbar-background { + box-shadow: none !important; + } + + #navigator-toolbox { + border: none !important; + } + + /* Bookmarks bar */ + .bookmark-item .toolbarbutton-icon { + display: none; + } + toolbarbutton.bookmark-item:not(.subviewbutton) { + min-width: 1.6em; + } + + /* Toolbar */ + #tracking-protection-icon-container, + #urlbar-zoom-button, + #star-button-box, + #pageActionButton, + #pageActionSeparator, + #tabs-newtab-button, + #back-button, + #PanelUI-button, + #forward-button, + .tab-secondary-label { + display: none !important; + } + + .urlbarView-url { + color: #dedede !important; + } + + /* Disable elements */ + #context-navigation, + #context-savepage, + #context-pocket, + #context-sendpagetodevice, + #context-selectall, + #context-viewsource, + #context-inspect-a11y, + #context-sendlinktodevice, + #context-openlinkinusercontext-menu, + #context-bookmarklink, + #context-savelink, + #context-savelinktopocket, + #context-sendlinktodevice, + #context-searchselect, + #context-sendimage, + #context-print-selection { + display: none !important; + } + + #context_bookmarkTab, + #context_moveTabOptions, + #context_sendTabToDevice, + #context_reopenInContainer, + #context_selectAllTabs, + #context_closeTabOptions { + display: none !important; + } \ No newline at end of file diff --git a/mixins/firefox/schizo.nix b/mixins/firefox/schizo.nix new file mode 100644 index 0000000..a85ae48 --- /dev/null +++ b/mixins/firefox/schizo.nix @@ -0,0 +1,80 @@ +{ + pkgs, + lib, + config, + inputs, + ... +}: { + home-manager.users.tzlil = { + imports = [ + inputs.schizofox.homeManagerModule + ]; + programs.schizofox = { + enable = true; + package = pkgs.firefox-wayland.unwrapped; + theme = { + background-darker = "181825"; + background = "1e1e2e"; + foreground = "cdd6f4"; + font = "APL 385 Unicode"; + simplefox.enable = true; + darkreader.enable = true; + extraCss = builtins.readFile ./userChrome.css; + }; + + search = { + defaultSearchEngine = "Kagi"; + removeEngines = ["Google" "Bing" "Amazon.com" "eBay" "Twitter" "Wikipedia"]; + addEngines = [ + { + Name = "Kagi"; + Description = "kagi"; + Method = "GET"; + URLTemplate = "https://kagi.com/search?q={searchTerms}"; + } + { + Name = "nixpkgs"; + Description = "nixpkgs"; + Alias = "!np"; + Method = "GET"; + URLTemplate = "https://search.nixos.org/packages?type=packages&query={searchTerms}"; + } + { + Name = "home-manager"; + Description = "home-manager"; + Alias = "!hm"; + Method = "GET"; + URLTemplate = "https://mipmip.github.io/home-manager-option-search?query={searchTerms}"; + } + { + Name = "invidious"; + Description = "invidious"; + Alias = "!yt"; + Method = "GET"; + URLTemplate = "https://yewtu.be/search?q={searchTerms}"; + } + ]; + }; + + security = { + sanitizeOnShutdown = false; + sandbox = true; + userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0"; + }; + + misc = { + # drmFix = true; + # disableWebgl = false; + startPageURL = "https://lobste.rs"; + }; + + extensions.extraExtensions = { + "uBlock0@raymondhill.net".install_url = "https://addons.mozilla.org/firefox/downloads/file/4171020/ublock_origin-1.52.2.xpi"; + "woop-NoopscooPsnSXQ@jetpack".install_url = "https://addons.mozilla.org/firefox/downloads/file/3360398/privacy_possum-2019.7.18.xpi"; + "skipredirect@sblask".install_url = "https://addons.mozilla.org/firefox/downloads/file/3920533/skip_redirect-2.3.6.xpi"; + "{3c078156-979c-498b-8990-85f7987dd929}".install_url = "https://github.com/mbnuqw/sidebery/releases/download/v5.0.0rc4/sidebery-5.0.0rc4.xpi"; + "redirector@einaregilsson.com".install_url = "https://addons.mozilla.org/firefox/downloads/file/3535009/redirector-3.5.3.xpi"; + }; + }; + }; +} diff --git a/mixins/multimedia.nix b/mixins/multimedia.nix index 0ced6f9..2e99771 100644 --- a/mixins/multimedia.nix +++ b/mixins/multimedia.nix @@ -63,10 +63,8 @@ # yank video link with timestamp "Ctrl+y" = "run ${pkgs.writeShellScript "yank-mpv-timestamp" " url=$1 - if [[ $url = *youtube.com* || $url = *youtu.be* || $url = *twitch.tv* ]]; then - timepos=\${2%.*} - url+=$([[ $1 = *\?* ]] && echo \\& || echo \\?)t=$(( timepos / 3600 ))h$(( timepos / 60 ))m$(( timepos % 60 ))s - fi + timepos=\${2%.*} + url+=$([[ $1 = *\?* ]] && echo \\& || echo \\?)t=$(( timepos / 3600 ))h$(( timepos / 60 ))m$(( timepos % 60 ))s ${pkgs.wl-clipboard}/bin/wl-copy $url "} \${path} \${=time-pos}"; diff --git a/mixins/sway.nix b/mixins/sway.nix index e588531..5981049 100644 --- a/mixins/sway.nix +++ b/mixins/sway.nix @@ -25,51 +25,21 @@ in { config = { security.pam.services.swaylock = {}; home-manager.users.tzlil = { - xdg.configFile."i3status-rust/config.toml".text = '' - [icons] - icons = "awesome6" - - [theme] - theme = "semi-native" - [theme.overrides] - separator = "" - - [[block]] - block = "music" - [[block.click]] - action = "play_pause" - button = "left" - - [[block]] - block = "net" - format = " $icon {$ssid |}$ip " - [[block]] - block = "memory" - format = " $icon $mem_total_used_percents.eng(w:2) " - - [[block]] - block = "cpu" - - [[block]] - block = "load" - - [[block]] - block = "battery" - interval = 10 - #format = "$percentage $time" - - [[block]] - block = "sound" - headphones_indicator=true - [[block.click]] - cmd = "${lib.getExe pkgs.pavucontrol}" - button = "left" - - [[block]] - block = "time" - interval = 60 - format = "$icon $timestamp.datetime(f:'%a %Y-%m-%d %H:%M')" - ''; + programs.waybar = { + enable = true; + settings = { + mainBar = { + modules-left = ["sway/workspaces" "sway/mode" "wlr/taskbar"]; + modules-center = ["sway/window"]; + modules-right = ["mpd" "temperature" "battery" "clock"]; + + "sway/workspaces" = { + disable-scroll = true; + all-outputs = false; + }; + }; + }; + }; services.mako.enable = true; home.packages = with pkgs; [ wf-recorder @@ -155,12 +125,15 @@ in { bars = [ { fonts = { - names = ["Iosevka" "FontAwesome"]; + # names = ["Iosevka" "FontAwesome"]; + names = ["APL385 Unicode"]; style = "Regular"; - size = 11.0; + size = 14.0; }; position = "top"; - statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs"; + # statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs"; + command = "${lib.getExe pkgs.waybar}"; + # command = "waybar"; colors = { statusline = "#ffffff"; background = "#323232"; |