aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschererleander <leander@schererleander.de>2025-05-10 21:18:05 +0200
committerschererleander <leander@schererleander.de>2025-05-10 21:18:05 +0200
commit44f79e0023fff0afae20048d93a722fd21d6ff80 (patch)
treea23a3fc6d5ae10b85f7c66679f684248e1387d0d
parente04b5300532d21adf889cccf05b7d1f64c290825 (diff)
add firefox
-rw-r--r--flake.lock90
-rw-r--r--flake.nix4
-rw-r--r--modules/firefox.nix96
3 files changed, 138 insertions, 52 deletions
diff --git a/flake.lock b/flake.lock
index bab7506..8b96c8f 100644
--- a/flake.lock
+++ b/flake.lock
@@ -15,6 +15,26 @@
"type": "github"
}
},
+ "firefox-addons": {
+ "inputs": {
+ "nixpkgs": "nixpkgs"
+ },
+ "locked": {
+ "dir": "pkgs/firefox-addons",
+ "lastModified": 1746849806,
+ "narHash": "sha256-6vJX4DnhDlWNtOOh3v08YqPgjJblfgHnV9562nPHNEo=",
+ "owner": "rycee",
+ "repo": "nur-expressions",
+ "rev": "e2408d3f94a6b658e12f135501aa7fd38efabc72",
+ "type": "gitlab"
+ },
+ "original": {
+ "dir": "pkgs/firefox-addons",
+ "owner": "rycee",
+ "repo": "nur-expressions",
+ "type": "gitlab"
+ }
+ },
"flake-compat": {
"flake": false,
"locked": {
@@ -113,7 +133,7 @@
"cl-nix-lite": "cl-nix-lite",
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
- "nixpkgs": "nixpkgs",
+ "nixpkgs": "nixpkgs_2",
"systems": "systems"
},
"locked": {
@@ -154,16 +174,16 @@
"nixcord": {
"inputs": {
"flake-compat": "flake-compat_2",
- "nixpkgs": "nixpkgs_2",
+ "nixpkgs": "nixpkgs_3",
"systems": "systems_2",
"treefmt-nix": "treefmt-nix"
},
"locked": {
- "lastModified": 1746274470,
- "narHash": "sha256-W0HZ4vkhY6RFXUFT1FDHmejINpaKg2NPdh+mEsm6GkM=",
+ "lastModified": 1746815338,
+ "narHash": "sha256-2M1JzogleVnHmt1RtNGwBRg6y6lLloVdNSu6v7qyrIw=",
"owner": "kaylorben",
"repo": "nixcord",
- "rev": "c1a3a9e0ea2668b01f875e53fd0df1c1fc38c9f1",
+ "rev": "471817830e794440f725d4ed698a5442e75b55ad",
"type": "github"
},
"original": {
@@ -174,27 +194,27 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1732617236,
- "narHash": "sha256-PYkz6U0bSEaEB1al7O1XsqVNeSNS+s3NVclJw7YC43w=",
- "owner": "NixOS",
+ "lastModified": 1744536153,
+ "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
+ "owner": "nixos",
"repo": "nixpkgs",
- "rev": "af51545ec9a44eadf3fe3547610a5cdd882bc34e",
+ "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11",
"type": "github"
},
"original": {
- "owner": "NixOS",
+ "owner": "nixos",
+ "ref": "nixpkgs-unstable",
"repo": "nixpkgs",
- "rev": "af51545ec9a44eadf3fe3547610a5cdd882bc34e",
"type": "github"
}
},
"nixpkgs-darwin": {
"locked": {
- "lastModified": 1746248057,
- "narHash": "sha256-cU9uu8n4VOOyRmd4mJF/QbMX5sVI/MVBSCh5l7/ySP0=",
+ "lastModified": 1746566971,
+ "narHash": "sha256-I40weT0FZWth1IEjgR5a0zC9LLyrPwTC0DAQcejtTJE=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "068169fd59f89a357bc1f227ab75cf90524f2f7c",
+ "rev": "209c5b3b0f5cf5b5a7e12ddea59bf19699f97e75",
"type": "github"
},
"original": {
@@ -206,6 +226,22 @@
},
"nixpkgs_2": {
"locked": {
+ "lastModified": 1732617236,
+ "narHash": "sha256-PYkz6U0bSEaEB1al7O1XsqVNeSNS+s3NVclJw7YC43w=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "af51545ec9a44eadf3fe3547610a5cdd882bc34e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "af51545ec9a44eadf3fe3547610a5cdd882bc34e",
+ "type": "github"
+ }
+ },
+ "nixpkgs_3": {
+ "locked": {
"lastModified": 1744868846,
"narHash": "sha256-5RJTdUHDmj12Qsv7XOhuospjAjATNiTMElplWnJE9Hs=",
"owner": "NixOS",
@@ -220,13 +256,13 @@
"type": "github"
}
},
- "nixpkgs_3": {
+ "nixpkgs_4": {
"locked": {
- "lastModified": 1746183838,
- "narHash": "sha256-kwaaguGkAqTZ1oK0yXeQ3ayYjs8u/W7eEfrFpFfIDFA=",
+ "lastModified": 1746557022,
+ "narHash": "sha256-QkNoyEf6TbaTW5UZYX0OkwIJ/ZMeKSSoOMnSDPQuol0=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "bf3287dac860542719fe7554e21e686108716879",
+ "rev": "1d3aeb5a193b9ff13f63f4d9cc169fb88129f860",
"type": "github"
},
"original": {
@@ -236,7 +272,7 @@
"type": "github"
}
},
- "nixpkgs_4": {
+ "nixpkgs_5": {
"locked": {
"lastModified": 1746663147,
"narHash": "sha256-Ua0drDHawlzNqJnclTJGf87dBmaO/tn7iZ+TCkTRpRc=",
@@ -255,7 +291,7 @@
"nur": {
"inputs": {
"flake-parts": "flake-parts",
- "nixpkgs": "nixpkgs_4",
+ "nixpkgs": "nixpkgs_5",
"treefmt-nix": "treefmt-nix_2"
},
"locked": {
@@ -267,18 +303,18 @@
"type": "github"
},
"original": {
- "owner": "nix-community",
- "repo": "NUR",
- "type": "github"
+ "id": "nur",
+ "type": "indirect"
}
},
"root": {
"inputs": {
+ "firefox-addons": "firefox-addons",
"home-manager": "home-manager",
"mac-app-util": "mac-app-util",
"nix-darwin": "nix-darwin",
"nixcord": "nixcord",
- "nixpkgs": "nixpkgs_3",
+ "nixpkgs": "nixpkgs_4",
"nixpkgs-darwin": "nixpkgs-darwin",
"nur": "nur",
"spicetify-nix": "spicetify-nix"
@@ -292,11 +328,11 @@
"systems": "systems_3"
},
"locked": {
- "lastModified": 1746287507,
- "narHash": "sha256-XzxmpEUbCXcBS7H00QmTAQf9xrMdvaFHrprkwb4i9CU=",
+ "lastModified": 1746738008,
+ "narHash": "sha256-bIMysaVhNyjuFgt8QpnGZv0T4YMao26Vz5R/xfYAJO0=",
"owner": "Gerg-L",
"repo": "spicetify-nix",
- "rev": "c09c8cbc0d650d451e4b48d00c63831437dae1b2",
+ "rev": "a43fae27f33f8d3e793a6ca2946190cb24a00b03",
"type": "github"
},
"original": {
diff --git a/flake.nix b/flake.nix
index 5e99721..fbfd237 100644
--- a/flake.nix
+++ b/flake.nix
@@ -11,7 +11,7 @@
home-manager.url = "github:nix-community/home-manager/release-24.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
- nur.url = "github:nix-community/NUR";
+ firefox-addons.url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
spicetify-nix.url = "github:Gerg-L/spicetify-nix";
spicetify-nix.inputs.nixpkgs.follows = "nixpkgs";
@@ -21,7 +21,7 @@
mac-app-util.url = "github:hraban/mac-app-util";
};
- outputs = { nixpkgs, nix-darwin, home-manager, ... } @ inputs: let
+ outputs = { nixpkgs, nur, nix-darwin, home-manager, ... } @ inputs: let
linux-system = "x86_64-linux";
darwin-system = "aarch64-darwin";
username = "schererleander";
diff --git a/modules/firefox.nix b/modules/firefox.nix
index 8423ec4..e95f646 100644
--- a/modules/firefox.nix
+++ b/modules/firefox.nix
@@ -1,42 +1,92 @@
-{ config, lib, pkgs, ... }:
+{ config, lib, pkgs, inputs, ... }:
let
cfg = config.firefox;
in {
- options.enable = lib.mkEnableOption = "Setup firefox";
+ options.firefox.enable = lib.mkEnableOption "Setup firefox";
config = lib.mkIf cfg.enable {
- program.firefox = {
+ programs.firefox = {
enable = true;
- extensions = with pkgs.nur.repos.rycee.firefox-addons; [
- ublock-origin
- istilldontcareaboutcookies
- sponsorblock
- vimium-c
- startpage-private-search
- ];
+ profiles.default = {
+ extensions = with inputs.firefox-addons.packages.${pkgs.system}; [
+ ublock-origin
+ istilldontcareaboutcookies
+ sponsorblock
+ vimium-c
+ startpage-private-search
+ adaptive-tab-bar-colour
+ ];
+ settings = {
+ "extensions.autoDisableScopes" = 0;
+ };
+ };
- userProfile = {
- preferences = {
- # Disable the Bookmarks Toolbar
- "browser.toolbars.bookmarks.visibility" = "never";
-
- # Disable Pocket
- "extensions.pocket.enabled" = false;
+ policies = {
+ DisableTelemetry = true;
+ DisableFirefoxStudies = true;
+ EnableTrackingProtection = {
+ Value= true;
+ Locked = true;
+ Cryptomining = true;
+ Fingerprinting = true;
+ };
+ DisablePocket = true;
+ DisplayBookmarksToolbar = "never";
- # Remove Firefox View
- "browser.newtabpage.activity-stream.showSponsored" = false;
+ Preferences = {
+ # Remove Firefox View
+ "browser.newtabpage.activity-stream.showSponsored" = false;
"browser.newtabpage.activity-stream.showSearch" = false;
"browser.newtabpage.activity-stream.showTopSites" = false;
"browser.newtabpage.activity-stream.showHighlights" = false;
+ "browser.newtabpage.enabled" = false;
+ "browser.toolbars.bookmarks.visibility" = "never";
- # privacy settings
- "privacy.firstparty.isolate" = true; # Isolate cookies per site
+ # privacy settings
+ "privacy.firstparty.isolate" = true; # Isolate cookies per site
"privacy.resistFingerprinting" = true;
+
+ # Enable HTTPS-Only Mode
+ "dom.security.https_only_mode" = true;
+ "dom.security.https_only_mode_ever_enabled" = true;
+
+ # Privacy settings
+ #"privacy.donottrackheader.enabled" = true;
"privacy.trackingprotection.enabled" = true;
+ "privacy.trackingprotection.socialtracking.enabled" = true;
+ "privacy.partition.network_state.ocsp_cache" = true;
+
+ # Disable all sorts of telemetry
+ "browser.newtabpage.activity-stream.feeds.telemetry" = false;
+ "browser.newtabpage.activity-stream.telemetry" = false;
+ "browser.ping-centre.telemetry" = false;
+ "toolkit.telemetry.archive.enabled" = false;
+ "toolkit.telemetry.bhrPing.enabled" = false;
+ "toolkit.telemetry.enabled" = false;
+ "toolkit.telemetry.firstShutdownPing.enabled" = false;
+ "toolkit.telemetry.hybridContent.enabled" = false;
+ "toolkit.telemetry.newProfilePing.enabled" = false;
+ "toolkit.telemetry.reportingpolicy.firstRun" = false;
+ "toolkit.telemetry.shutdownPingSender.enabled" = false;
+ "toolkit.telemetry.unified" = false;
+ "toolkit.telemetry.updatePing.enabled" = false;
+
+ # Disable Firefox 'experiments'
+ "experiments.activeExperiment" = false;
+ "experiments.enabled" = false;
+ "experiments.supported" = false;
+ "network.allow-experiments" = false;
+
+ # Disable Pocket Integration
+ "browser.newtabpage.activity-stream.section.highlights.includePocket" = false;
+ "extensions.pocket.enabled" = false;
+ "extensions.pocket.api" = "";
+ "extensions.pocket.oAuthConsumerKey" = "";
+ "extensions.pocket.showHome" = false;
+ "extensions.pocket.site" = "";
};
};
};
};
-}
-
+} \ No newline at end of file