aboutsummaryrefslogtreecommitdiff
path: root/profiles/disableLocation.nix
diff options
context:
space:
mode:
authortilpner2020-06-15 09:53:06 +0200
committertilpner2020-06-15 09:53:06 +0200
commit367b0c114f38d5c332f5ee971ad13dd69e302dec (patch)
treeec0c5ee3e7e1f0a30517599e51bd0c8172635158 /profiles/disableLocation.nix
parent2992d92e6ce0d7c96ccded0747d8815d8cfed956 (diff)
downloadfirefox-profiles-367b0c114f38d5c332f5ee971ad13dd69e302dec.tar.gz
firefox-profiles-367b0c114f38d5c332f5ee971ad13dd69e302dec.tar.xz
firefox-profiles-367b0c114f38d5c332f5ee971ad13dd69e302dec.zip
WIP towards module based configuration
Diffstat (limited to 'profiles/disableLocation.nix')
-rw-r--r--profiles/disableLocation.nix22
1 files changed, 22 insertions, 0 deletions
diff --git a/profiles/disableLocation.nix b/profiles/disableLocation.nix
new file mode 100644
index 0000000..1592dbb
--- /dev/null
+++ b/profiles/disableLocation.nix
@@ -0,0 +1,22 @@
+{ config, lib, ff, ... }: with lib; {
+ options.features.disableLocation = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Forbid requests for the users precise location.
+ The remote end will still be able to look up the users IP address in a database, for
+ an approximate location.
+ '';
+ };
+
+ config.policies = mkIf config.features.disableLocation {
+ Permissions.Location = {
+ BlockNewRequests = true;
+ Locked = true;
+ };
+
+ Preferences = ff.flattenAttrs {
+ geo.enabled = false;
+ };
+ };
+}