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/forgetActivity.nix | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'profiles/forgetActivity.nix') diff --git a/profiles/forgetActivity.nix b/profiles/forgetActivity.nix index ba45b0b..85e2093 100644 --- a/profiles/forgetActivity.nix +++ b/profiles/forgetActivity.nix @@ -1,14 +1,20 @@ -{ }: { - meta.description = '' - Delete all data accumulated during the users browsing session, - or prevent persistent storage in the first place. - ''; - - policies = { - SanitizeOnShutdown = true; +{ config, lib, ... }: with lib; { + options.dataFrugality.forgetActivity = lib.mkOption { + type = types.bool; + default = false; + description = '' + Delete all data accumulated during the users browsing session, + or prevent persistent storage in the first place. + ''; }; - preferences = { - browser.cache.disk.enabled = false; + config = lib.mkIf config.dataFrugality.forgetActivity { + policies = { + SanitizeOnShutdown = true; + }; + + preferences = { + browser.cache.disk.enabled = false; + }; }; } -- cgit v1.2.3