From 367b0c114f38d5c332f5ee971ad13dd69e302dec Mon Sep 17 00:00:00 2001 From: tilpner Date: Mon, 15 Jun 2020 09:53:06 +0200 Subject: WIP towards module based configuration --- profiles/replaceAllUrls.nix | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) (limited to 'profiles/replaceAllUrls.nix') diff --git a/profiles/replaceAllUrls.nix b/profiles/replaceAllUrls.nix index 8b71033..4c047ea 100644 --- a/profiles/replaceAllUrls.nix +++ b/profiles/replaceAllUrls.nix @@ -1,30 +1,35 @@ -{ ... }: +{ config, lib, ... }: +with lib; let # Requirements: # - is valid connection target (from FF perspective) # - doesn't have any negative effects on the user privacy or security h = "127.0.0.1"; - u = "http://${h}"; + u = lib.mkForce "http://${h}"; in { - meta.description = '' - Firefox communicates with external services in many different ways. Not all of them - happen on startup, and they can be triggered on different intervals. + options.dataFrugality.replaceAllUrls = mkOption { + type = types.bool; + default = false; + description = '' + Firefox communicates with external services in many different ways. Not all of them + happen on startup, and they can be triggered on different intervals. - This is a desperate effort to prevent as much of that communication as possible, by depriving FF of all configurable - URLs. It will break things, put the users security/privacy at risk, and probably shouldn't be enabled. + This is a desperate effort to prevent as much of that communication as possible, by depriving FF of all configurable + URLs. It will break things, put the users security/privacy at risk, and probably shouldn't be enabled. - Even so, this list may be insufficient. It was created manually from an about:config listing - for the searchterms "url", "uri", "endpoint", and "server", so it will miss hidden (but defaulted) and hardcoded URLs. + Even so, this list may be insufficient. It was created manually from an about:config listing + for the searchterms "url", "uri", "endpoint", and "server", so it will miss hidden (but defaulted) and hardcoded URLs. - Further consideration for the placeholder value is required. + Further consideration for the placeholder value is required. - Known issues: - - This list will get outdated rather quickly - - Typos and renaming of keys are not caught in any way - ''; + Known issues: + * This list will get outdated rather quickly + * Typos and renaming of keys are not caught in any way + ''; + }; - preferences = { + config.preferences = lib.mkIf config.dataFrugality.replaceAllUrls { app = { feedback.baseURL = u; releaseNotesURL = u; -- cgit v1.2.3