diff options
-rw-r--r-- | hosts/navi/default.nix | 2 | ||||
-rw-r--r-- | hosts/vps/services/website.nix | 2 | ||||
-rw-r--r-- | mixins/firefox/absolute-minimum.nix | 80 | ||||
-rw-r--r-- | mixins/sway.nix | 1 |
4 files changed, 71 insertions, 14 deletions
diff --git a/hosts/navi/default.nix b/hosts/navi/default.nix index bed73ba..1bb573f 100644 --- a/hosts/navi/default.nix +++ b/hosts/navi/default.nix @@ -15,7 +15,7 @@ ../../mixins/pipewire.nix ../../mixins/multimedia.nix ../../mixins/syncthing.nix - ../../mixins/firefox/absolute-minimum.nix + ../../mixins/firefox ]; config = { diff --git a/hosts/vps/services/website.nix b/hosts/vps/services/website.nix index 5d1d48a..05ea36f 100644 --- a/hosts/vps/services/website.nix +++ b/hosts/vps/services/website.nix @@ -78,6 +78,8 @@ i like music <a href="https://fm.tzlil.net">https://fm.tzlil.net</a> + 15s english typing personal best: 205.4 wpm + my interests: plan9 lambda calculus diff --git a/mixins/firefox/absolute-minimum.nix b/mixins/firefox/absolute-minimum.nix index 7d9fd79..3a9eb9a 100644 --- a/mixins/firefox/absolute-minimum.nix +++ b/mixins/firefox/absolute-minimum.nix @@ -18,17 +18,27 @@ in }) {}; mozlz4 = n: x: pkgs.runCommand "${n}.lz4" {buildInputs = [pkgs.mozlz4a];} '' - mozlz4a ${pkgs.writeTextFile {name=n; text=builtins.toJSON x;}} $out + 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}"; - addonStartupData = builtins.fromJSON (builtins.readFile (pkgs.runCommand "addonStartup.json" {buildInputs = [ pkgs.xvfb-run pkgs.mozlz4a pkgs.jq (pkgs.firefox.override { - extraPolicies.Extensions.Install = map (x: x.src.outPath) addons; - })];} '' + extensionsData = pkgs.runCommand "extensions.json" { + buildInputs = [ + pkgs.xvfb-run + pkgs.mozlz4a + pkgs.jq + (pkgs.firefox.override { + extraPolicies.Extensions.Install = map (x: x.src.outPath) addons; + }) + ]; + } '' HOME=$(mktemp -d) - export FONTCONFIG_FILE=${pkgs.makeFontsConf { fontDirectories = [ pkgs.roboto ]; }} + export FONTCONFIG_FILE=${pkgs.makeFontsConf {fontDirectories = [pkgs.roboto];}} mkdir -p $HOME/.mozilla/firefox/default cat >> $HOME/.mozilla/firefox/profiles.ini<< EOF [Profile0] @@ -42,7 +52,13 @@ in xvfb-run firefox --screenshot about:blank - mozlz4a -d $HOME/.mozilla/firefox/default/addonStartup.json.lz4 /dev/stdout | jq .\"app-profile\".addons > $out + cat $HOME/.mozilla/firefox/default/extensions.json > $out + # mozlz4a -d $HOME/.mozilla/firefox/default/addonStartup.json.lz4 /dev/stdout | jq .\"app-profile\".addons > $out + ''; + + 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 @@ -55,26 +71,56 @@ in 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 { + home.file."${prf}/extensions".source = lib.mkForce "${pkgs.symlinkJoin { name = "extensions"; paths = addons; - }}/share/mozilla/${extensionPath}"); + }}/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" {"app-profile".addons = addonStartupData;}; - home.file."${prf}/addonStartup.json.lz4.tmp".source = pkgs.emptyFile; + # home.file."${prf}/addonStartup.json.lz4".source = mozlz4 "addonStartup.json" {"app-profile".addons = addonStartupData;}; + # 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 = 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 + # tries to access W_OK it forever # home.file."${prf}/prefs.js".source = pkgs.emptyFile; # home.file."${prf}/prefs-1.js".source = pkgs.emptyFile; @@ -82,7 +128,15 @@ in enable = true; profiles.${profile} = { extensions = with firefox-addons; [ - kristofferhagen-nord-theme + # kristofferhagen-nord-theme + + ublock-origin + clearurls + privacy-possum + skip-redirect + canvasblocker + + sidebery ]; settings = { "extensions.activeThemeID" = "{e410fec2-1cbd-4098-9944-e21e708418af}"; diff --git a/mixins/sway.nix b/mixins/sway.nix index 678206d..28e21d9 100644 --- a/mixins/sway.nix +++ b/mixins/sway.nix @@ -237,6 +237,7 @@ in { "${modifier}+minus" = "scratchpad show"; #"${modifier}+m" = "mode notifications"; "${modifier}+m" = "exec ${pkgs.wl-clipboard}/bin/wl-paste | xargs mpv"; + "${modifier}+y" = "exec ${lib.getExe pkgs.ytfzf} -D -L | xargs mpv"; "${modifier}+l" = "exec ${lib.getExe pkgs.swaylock} -c 070D0D"; "Print" = "exec ${lib.getExe pkgs.sway-contrib.grimshot} copy area"; |