summaryrefslogtreecommitdiff
path: root/modules/features/browser.nix
diff options
context:
space:
mode:
authorNatasha Moongrave <natasha@256phi.eu>2026-06-28 13:06:19 +0200
committerNatasha Moongrave <natasha@256phi.eu>2026-06-28 13:06:19 +0200
commitbdb473938287fcef27e4793fbb115a1345f11b9a (patch)
tree54159a4a81e465f457d165b0a321e1da7dc79386 /modules/features/browser.nix
parent070eb41d245b96e849e8a24ca8e703338be1892e (diff)
Moved features to desktop
Diffstat (limited to 'modules/features/browser.nix')
-rw-r--r--modules/features/browser.nix167
1 files changed, 0 insertions, 167 deletions
diff --git a/modules/features/browser.nix b/modules/features/browser.nix
deleted file mode 100644
index e24f252..0000000
--- a/modules/features/browser.nix
+++ /dev/null
@@ -1,167 +0,0 @@
-{inputs, ...}: let
- extensions = {
- core = [
- "ublock-origin"
- "privacybadger"
- "cleanurls"
- "sidebery"
- ];
- security = [
- "bitwarden-password-manager"
- ];
- qol = [
- "dark-reader"
- "stylus"
- ];
- youtube = [
- "sponsorblock"
- "return-youtube-dislikes"
- ];
- };
-
- mkExt = names:
- map (
- name: "https://addons.mozilla.org/firefox/downloads/latest/${name}/latest.xpi"
- )
- names;
-in {
- # -----------------------------
- # NIXOS MODULE
- # -----------------------------
- flake.nixosModules.browser = {
- lib,
- pkgs,
- self,
- ...
- }: {
- home-manager.users.mun = {
- programs.librewolf = {
- enable = true;
- package = inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.librewolf-sandboxed;
-
- languagePacks = ["en-GB" "cs" "sk" "de"];
-
- policies = {
- DisableTelemetry = true;
- DisableFirefoxStudies = true;
- DisablePocket = true;
- DisableFeedbackCommands = true;
-
- DefaultDownloadDirectory = "\${home}/Downloads";
-
- # -----------------------------
- # EXTENSIONS
- # -----------------------------
- Extensions.Install = mkExt (extensions.core ++ extensions.security ++ extensions.youtube);
-
- Extensions.Uninstall = [
- "google@search.mozilla.org"
- "bing@search.mozilla.org"
- "ddg@search.mozilla.org"
- ];
- };
-
- profiles = {
- # -------------------------
- # 1. DAILY PROFILE (mun)
- # -------------------------
- mun = {
- isDefault = true;
-
- search = {
- force = true;
- default = "duckduckbleh";
-
- engines = {
- "duckduckbleh" = {
- urls = [
- {
- template = "https://noai.duckduckgo.com/";
- params = [
- {
- name = "q";
- value = "{searchTerms}";
- }
- ];
- }
- ];
- definedAliases = ["duck" "d"];
- };
- };
- };
-
- settings = {
- "signon.rememberSignons" = false;
- "browser.startup.homepage" = "about:blank";
- };
- };
-
- # -------------------------
- # 2. WORK PROFILE
- # -------------------------
- work = {
- isDefault = false;
-
- settings = {
- # more permissive (auth sites break otherwise)
- "signon.rememberSignons" = true;
- "network.cookie.lifetimePolicy" = 0;
- };
- };
-
- # -------------------------
- # 3. SCHOOL PROFILE
- # -------------------------
- school = {
- isDefault = false;
-
- settings = {
- "signon.rememberSignons" = true;
- "privacy.clearOnShutdown.cookies" = false;
- };
- };
-
- # -------------------------
- # 4. OPSEC PROFILE (STRICT)
- # -------------------------
- opsec = {
- isDefault = false;
-
- settings = {
- "signon.rememberSignons" = false;
- "network.cookie.lifetimePolicy" = 2;
-
- "privacy.clearOnShutdown.cookies" = true;
- "privacy.clearOnShutdown.history" = true;
- };
- };
- };
-
- # GLOBAL BASELINE (applies to all profiles)
- settings = {
- "privacy.trackingprotection.enabled" = true;
- "network.dns.disablePrefetch" = true;
- "browser.send_pings" = false;
- "dom.security.https_only_mode" = true;
- "privacy.resistFingerprinting" = true;
- };
- };
- };
- };
-
- perSystem = {pkgs, ...}: {
- packages.librewolf-sandboxed = pkgs.writeShellScriptBin "librewolf" ''
- exec ${pkgs.bubblewrap}/bin/bwrap \
- --unshare-all \
- --die-with-parent \
- --proc /proc \
- --dev /dev \
- --tmpfs /tmp \
- --ro-bind /nix/store /nix/store \
- --dir $HOME \
- --setenv HOME $HOME \
- --setenv MOZ_ENABLE_WAYLAND 1 \
- ${pkgs.librewolf}/bin/librewolf "$@"
- '';
- };
-}