From 20eae0649d89de6f4f6dd386b3353fd351865409 Mon Sep 17 00:00:00 2001 From: sefidel Date: Thu, 21 Dec 2023 19:33:36 +0900 Subject: feat(home/browsing): manage firefox --- flake.lock | 16 ++++++++++++++++ flake.nix | 2 ++ home/default.nix | 4 ++-- home/profiles/browsing/default.nix | 31 +++++++++++++++++++++++++++++-- 4 files changed, 49 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index 6312010..712abc9 100644 --- a/flake.lock +++ b/flake.lock @@ -352,6 +352,21 @@ "type": "github" } }, + "nur": { + "locked": { + "lastModified": 1703151853, + "narHash": "sha256-gprJXHmq/n0jrNx0EYKuBT4ejtIDyVAfiT6ZPyyLcPI=", + "owner": "nix-community", + "repo": "NUR", + "rev": "645447668a47f90ce4745356a46cf2dcb3977205", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NUR", + "type": "github" + } + }, "root": { "inputs": { "helix": "helix", @@ -360,6 +375,7 @@ "neovim-nightly": "neovim-nightly", "nix-gaming": "nix-gaming", "nixpkgs-2305": "nixpkgs-2305", + "nur": "nur", "rust": "rust", "sops-nix": "sops-nix", "unstable": "unstable", diff --git a/flake.nix b/flake.nix index 2ab3eb2..891263d 100644 --- a/flake.nix +++ b/flake.nix @@ -9,6 +9,8 @@ home-manager.url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "unstable"; + nur.url = "github:nix-community/NUR"; + impermanence.url = "github:nix-community/impermanence"; sops-nix.url = "github:Mic92/sops-nix"; diff --git a/home/default.nix b/home/default.nix index c2adfdd..bd29124 100644 --- a/home/default.nix +++ b/home/default.nix @@ -4,7 +4,7 @@ "sefidel@alpha" = self.lib.mkHome { username = "sefidel"; hostname = "alpha"; - pkgs = import unstable { system = "x86_64-linux"; overlays = with inputs; [ rust.overlays.default neovim-nightly.overlay helix.overlays.default ]; }; + pkgs = import unstable { system = "x86_64-linux"; overlays = with inputs; [ rust.overlays.default neovim-nightly.overlay helix.overlays.default nur.overlay ]; }; extraModules = [ ./profiles/populate.nix @@ -29,7 +29,7 @@ "sefidel@haruka" = self.lib.mkHome { username = "sefidel"; hostname = "haruka"; - pkgs = import unstable { system = "x86_64-linux"; overlays = with inputs; [ rust.overlays.default neovim-nightly.overlay helix.overlays.default ]; }; + pkgs = import unstable { system = "x86_64-linux"; overlays = with inputs; [ rust.overlays.default neovim-nightly.overlay helix.overlays.default nur.overlay ]; }; extraModules = [ ./profiles/populate.nix diff --git a/home/profiles/browsing/default.nix b/home/profiles/browsing/default.nix index 0c16ca6..5c04438 100644 --- a/home/profiles/browsing/default.nix +++ b/home/profiles/browsing/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, inputs, lib, pkgs, ... }: let cfg = config.profiles.browsing; @@ -19,7 +19,7 @@ in }; config = lib.mkIf cfg.enable { - home.packages = with pkgs; [ firefox lynx ]; + home.packages = with pkgs; [ lynx ]; sops.secrets.kagi-query = { }; sops.secrets.kagi-session = { }; @@ -65,6 +65,33 @@ in # ''; }; + programs.firefox = { + enable = true; + package = pkgs.firefox.override { + extraPolicies = { + # CaptivePortal = false; + DisableFirefoxStudies = true; + DisableTelemetry = true; + DontCheckDefaultBrowser = true; + OfferToSaveLogins = false; + OfferToSaveLoginsDefault = false; + UserMessaging = { + ExtensionRecommendations = false; + SkipOnboarding = true; + }; + }; + }; + + profiles.default = { + id = 0; + + extensions = with pkgs.nur.repos.rycee.firefox-addons; [ + bitwarden + kagi-search + ]; + }; + }; + xdg.mimeApps = lib.mkIf pkgs.stdenv.isLinux { enable = true; defaultApplications = { -- cgit 1.4.1