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/disableLocation.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 profiles/disableLocation.nix (limited to 'profiles/disableLocation.nix') 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; + }; + }; +} -- cgit v1.2.3