about summary refs log tree commit diff stats
path: root/modules/home.legacy/conf/firefox/default.nix
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-04-02 18:13:25 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-04-02 18:15:48 +0200
commit4d04e90f0941350957afe7ffe17e99fe27eca2b9 (patch)
tree93291063f47d4d7f69c7955903141bdacc4b5373 /modules/home.legacy/conf/firefox/default.nix
parentrefactor(treewide): Remove `river_init_lesser` (diff)
downloadnixos-config-4d04e90f0941350957afe7ffe17e99fe27eca2b9.zip
refactor(modules/legacy/firefox): Move to by-name
This also improves the arkanfox-integration and the profile id
generation.
Diffstat (limited to 'modules/home.legacy/conf/firefox/default.nix')
-rw-r--r--modules/home.legacy/conf/firefox/default.nix133
1 files changed, 0 insertions, 133 deletions
diff --git a/modules/home.legacy/conf/firefox/default.nix b/modules/home.legacy/conf/firefox/default.nix
index 663c4978..e69de29b 100644
--- a/modules/home.legacy/conf/firefox/default.nix
+++ b/modules/home.legacy/conf/firefox/default.nix
@@ -1,133 +0,0 @@
-{
-  config,
-  pkgs,
-  lib,
-  user_js,
-  ...
-}: let
-  extensions =
-    builtins.fromJSON (builtins.readFile ./config/extensions/extensions.json);
-
-  userChrome = builtins.readFile ./config/chrome/userChrome.css;
-  bookmarks = (import ./config/bookmarks/default.nix) {
-    inherit
-      pkgs
-      lib
-      ;
-  };
-  engines = (import ./config/search/engines) {inherit pkgs;};
-
-  native_messaging_hosts = (import ./config/extensions/native_messaging_hosts/default.nix) {inherit pkgs;};
-
-  policies = (import ./config/policies) {inherit config extensions;};
-
-  search = {
-    default = "Brave Search";
-    privateDefault = "Brave Search";
-    force = true;
-    order = [
-      # DEFAULT
-      "Brave Search"
-
-      # NIX
-      "Nix Packages"
-      "Nix Options"
-      "Nixpkgs issues"
-      "Homemanager Options"
-      "NixOS Wiki"
-      "Nixpkgs Pull Request Tracker"
-
-      # RUST
-      "Rust std"
-      "Rust tokio"
-
-      # OTHER
-      "Google Scholar"
-      "Wikipedia"
-      "Arch Wiki"
-    ];
-
-    inherit engines;
-  };
-
-  prefConfig = builtins.readFile "${
-    (import ./config/prefs) {inherit pkgs lib config bookmarks user_js;}
-  }/user.js";
-
-  # Package {{{
-  package = import ./package.nix {
-    inherit config lib pkgs;
-    extraPolicies = policies;
-    extraNativeMessagingHosts = native_messaging_hosts;
-  };
-  # }}}
-
-  # Profiles {{{
-  profiles = {
-    "default" = {
-      inherit search userChrome;
-      isDefault = true;
-      id = 0;
-      name = "default";
-      extraConfig = prefConfig;
-    };
-  };
-
-  taskwarriorProfiles = import ../taskwarrior/firefox {
-    inherit
-      config
-      lib
-      # options
-      prefConfig
-      search
-      userChrome
-      ;
-    profile_size = builtins.length (builtins.attrNames profiles);
-  };
-  # }}}
-in {
-  options.soispha.firefox = {
-    package = lib.mkOption {
-      type = lib.types.package;
-      default = pkgs.firefox;
-      description = "Firefox package to use.";
-      defaultText = lib.literalExpression "pkgs.firefox";
-      relatedPackages = [
-        "firefox"
-        "firefox-beta-bin"
-        "firefox-bin"
-        "firefox-devedition-bin"
-        "firefox-esr"
-      ];
-    };
-    package_version = lib.mkOption {
-      type = lib.types.str;
-      default = pkgs.firefox.version;
-      description = "Firefox version to use";
-    };
-  };
-
-  config = {
-    soispha.firefox.package = package;
-    soispha.firefox.package_version = pkgs.firefox.version;
-    home.sessionVariables = {
-      # improve touch input & make scrolling smother
-      MOZ_USE_XINPUT2 = "1";
-
-      # improve wayland support
-      MOZ_ENABLE_WAYLAND = 1;
-
-      # tell gtk to use portals
-      GTK_USE_PORTAL = 1;
-
-      BROWSER = "firefox";
-    };
-    programs.firefox = {
-      enable = true;
-      inherit (config.soispha.firefox) package;
-      profiles =
-        profiles
-        // taskwarriorProfiles;
-    };
-  };
-}