From 15c198fa727bf72a79be38e4c350c1aa3c3ad475 Mon Sep 17 00:00:00 2001 From: Matt Nish-Lapidus Date: Fri, 9 May 2025 13:43:29 -0400 Subject: [PATCH] browsers ugh --- flake.lock | 87 +++++++++++++++++++++++++++++---------- flake.nix | 8 ++-- modules/home/browsers.nix | 36 ++++++++++++++++ modules/home/desktop.nix | 5 ++- modules/home/niri.nix | 4 +- modules/home/yazi.nix | 2 - 6 files changed, 110 insertions(+), 32 deletions(-) create mode 100644 modules/home/browsers.nix diff --git a/flake.lock b/flake.lock index 6a7dfa5..a141336 100644 --- a/flake.lock +++ b/flake.lock @@ -30,11 +30,11 @@ ] }, "locked": { - "lastModified": 1746695594, - "narHash": "sha256-pAAWYs3S+/tY65vemHZdVSXpeIz4JINEJZoPoBjr8JU=", + "lastModified": 1746729224, + "narHash": "sha256-9R4sOLAK1w3Bq54H3XOJogdc7a6C2bLLmatOQ+5pf5w=", "owner": "nix-community", "repo": "disko", - "rev": "6bb82b77ce140137177e30df067759931ab60a73", + "rev": "85555d27ded84604ad6657ecca255a03fd878607", "type": "github" }, "original": { @@ -90,11 +90,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1746721524, - "narHash": "sha256-DZFZfWKobG/Z+F2Hd99csxUT5Oo4TnnZQV2OSYvblVY=", + "lastModified": 1746807886, + "narHash": "sha256-gNS0r0JdkdsrqYkzpJK20vDRFSy7+1fuziRWd4BZiu4=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "3cbccdceacacdb60d18f31272451cfc748039ba4", + "rev": "8ae925057bad39c6a72f55dd2ff0b281e2cea714", "type": "github" }, "original": { @@ -378,11 +378,32 @@ ] }, "locked": { - "lastModified": 1746719124, - "narHash": "sha256-KOL73WIjO00ds1oIe+5HAcGcpd/TfE6dymmmYbiSlYM=", + "lastModified": 1746798521, + "narHash": "sha256-axfz/jBEH9XHpS7YSumstV7b2PrPf7L8bhWUtLBv3nA=", "owner": "nix-community", "repo": "home-manager", - "rev": "3c59c5132b64e885faca381e713b579dcbddba75", + "rev": "e95a7c5b6fa93304cd2fd78cf676c4f6d23c422c", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_2": { + "inputs": { + "nixpkgs": [ + "zen-browser", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1743604125, + "narHash": "sha256-ZD61DNbsBt1mQbinAaaEqKaJk2RFo9R/j+eYWeGMx7A=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "180fd43eea296e62ae68e079fcf56aba268b9a1a", "type": "github" }, "original": { @@ -540,11 +561,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1746602021, - "narHash": "sha256-t0WFf/bGwxR+28jYix5GxRbfogdzUaGqVZDs9PrxAK4=", + "lastModified": 1746809694, + "narHash": "sha256-WLz+tLh7nZfZ6GmwTOBCqP6RClMhdnW7xWsvlgc0Ttg=", "owner": "hyprwm", "repo": "hyprlock", - "rev": "c12cf8e5098bfacd0254b7ceb583329347e5ed1a", + "rev": "f7f0c9c6b0b930905eddd61ead4a5f12bf534815", "type": "github" }, "original": { @@ -740,11 +761,11 @@ ] }, "locked": { - "lastModified": 1746705602, - "narHash": "sha256-IJZaGco28YI4IF7gErOyWxZGZ9sLxrbAHBAbV1q3GXw=", + "lastModified": 1746758336, + "narHash": "sha256-HN7R9p94Othop41GXf//vMxoi9HAx42fjySIRDljUVc=", "owner": "viperML", "repo": "nh", - "rev": "d36ff531d2e0503dce3ac8a6ec5915d2dd2a3a54", + "rev": "28972b6fe193151cd52ed5bc4bb6b91cee21467b", "type": "github" }, "original": { @@ -1064,11 +1085,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1746461020, - "narHash": "sha256-7+pG1I9jvxNlmln4YgnlW4o+w0TZX24k688mibiFDUE=", + "lastModified": 1746663147, + "narHash": "sha256-Ua0drDHawlzNqJnclTJGf87dBmaO/tn7iZ+TCkTRpRc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3730d8a308f94996a9ba7c7138ede69c1b9ac4ae", + "rev": "dda3dcd3fe03e991015e9a74b22d35950f264a54", "type": "github" }, "original": { @@ -1187,7 +1208,8 @@ "waybar": "waybar", "wezterm": "wezterm", "xwayland-satellite": "xwayland-satellite", - "yazi": "yazi" + "yazi": "yazi", + "zen-browser": "zen-browser" } }, "rust-overlay": { @@ -1509,11 +1531,11 @@ }, "locked": { "dir": "nix", - "lastModified": 1746365493, - "narHash": "sha256-8Js+cgkK9cHcJFBSSbLQoOnojYY4I6F4vGBq3zoUId8=", + "lastModified": 1746809679, + "narHash": "sha256-AnT5xK/a3owTS6eDnDPLUF0cdEMK3SoEPLSNMgyWcpo=", "owner": "wez", "repo": "wezterm", - "rev": "dd3caaae34e0c8557e9f2b4557b573fe2cdb37dd", + "rev": "af8d521ef606eaf301de4678ec5270c3723bd915", "type": "github" }, "original": { @@ -1600,6 +1622,27 @@ "type": "github" } }, + "zen-browser": { + "inputs": { + "home-manager": "home-manager_2", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1746760187, + "narHash": "sha256-L1NQFK3X4e0Xidw7D7ECQv3G+j4fXkxW7ITGZkjIk8s=", + "owner": "0xc000022070", + "repo": "zen-browser-flake", + "rev": "7aa363c80e66548445ce392edc6d05a7d74b8fd7", + "type": "github" + }, + "original": { + "owner": "0xc000022070", + "repo": "zen-browser-flake", + "type": "github" + } + }, "zlib": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index 98ac957..c108134 100644 --- a/flake.nix +++ b/flake.nix @@ -98,10 +98,10 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - # impala = { - # url = "github:pythops/impala"; - # inputs.nixpkgs.follows = "nixpkgs"; - # }; + zen-browser = { + url = "github:0xc000022070/zen-browser-flake"; + inputs.nixpkgs.follows = "nixpkgs"; + }; # emenel-templates.url = "git+ssh://git@gt.emenel.ca/emenel/nix-flake-templates"; # nix-way-templates.url = "github:the-nix-way/dev-templates"; diff --git a/modules/home/browsers.nix b/modules/home/browsers.nix new file mode 100644 index 0000000..366cca7 --- /dev/null +++ b/modules/home/browsers.nix @@ -0,0 +1,36 @@ +{ inputs, pkgs, ... }: +let + firefox-policies = { + AutofillAddressEnabled = true; + AutofillCreditCardEnabled = false; + DisableAppUpdate = true; + DisableFeedbackCommands = true; + DisableFirefoxStudies = true; + DisablePocket = true; # save webs for later reading + DisableTelemetry = true; + DontCheckDefaultBrowser = true; + NoDefaultBookmarks = true; + OfferToSaveLogins = false; + }; +in +{ + + imports = [ inputs.zen-browser.homeModules.twilight ]; + + programs = { + zen-browser = { + enable = true; + policies = firefox-policies; + }; + + librewolf = { + enable = true; + policies = firefox-policies; + }; + + chromium = { + enable = true; + package = pkgs.ungoogled-chromium; + }; + }; +} diff --git a/modules/home/desktop.nix b/modules/home/desktop.nix index 50dd8a7..70f4832 100644 --- a/modules/home/desktop.nix +++ b/modules/home/desktop.nix @@ -10,6 +10,7 @@ hyprlock hypridle sway-launcher-desktop + browsers ]; home.packages = with pkgs; [ @@ -74,7 +75,7 @@ impression zoom-us nyxt - ungoogled-chromium + obsidian vlc discord @@ -120,7 +121,7 @@ protonplus fstl - librewolf + # librewolf wl-color-picker diff --git a/modules/home/niri.nix b/modules/home/niri.nix index 7971fb3..110e9f0 100644 --- a/modules/home/niri.nix +++ b/modules/home/niri.nix @@ -286,8 +286,8 @@ in action = spawn "emacsclient" "-r" "-n"; }; "Mod+Ctrl+B" = { - hotkey-overlay.title = "Librewolf Browser"; - action = spawn "librewolf"; + hotkey-overlay.title = "Zen Browser"; + action = spawn "zen"; }; "Mod+Ctrl+F" = { hotkey-overlay.title = "Yazi"; diff --git a/modules/home/yazi.nix b/modules/home/yazi.nix index b2f72bb..70f584b 100644 --- a/modules/home/yazi.nix +++ b/modules/home/yazi.nix @@ -142,8 +142,6 @@ { name = "*.rst"; run = "rich-preview"; } { name = "*.ipynb"; run = "rich-preview"; } { name = "*.json"; run = "rich-preview"; } - # { name = "*.lisp"; run = "rich-preview"; } - # { name = "*.el"; run = "rich-preview"; } { name = "*.org"; run = "rich-preview"; } ]; append_previewers = [