diff options
author | tilpner | 2020-06-15 09:53:06 +0200 |
---|---|---|
committer | tilpner | 2020-06-15 09:53:06 +0200 |
commit | 367b0c114f38d5c332f5ee971ad13dd69e302dec (patch) | |
tree | ec0c5ee3e7e1f0a30517599e51bd0c8172635158 /nix/options.nix | |
parent | 2992d92e6ce0d7c96ccded0747d8815d8cfed956 (diff) | |
download | firefox-profiles-367b0c114f38d5c332f5ee971ad13dd69e302dec.tar.gz firefox-profiles-367b0c114f38d5c332f5ee971ad13dd69e302dec.tar.xz firefox-profiles-367b0c114f38d5c332f5ee971ad13dd69e302dec.zip |
WIP towards module based configuration
Diffstat (limited to 'nix/options.nix')
-rw-r--r-- | nix/options.nix | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/nix/options.nix b/nix/options.nix new file mode 100644 index 0000000..cbd21a5 --- /dev/null +++ b/nix/options.nix @@ -0,0 +1,66 @@ +{ options, pkgs, lib, ... }: + +with lib; +let + # https://github.com/NixOS/nixpkgs/pull/75584 + json = with lib.types; let + valueType = nullOr (oneOf [ + bool + int + float + str + (attrsOf valueType) + (listOf valueType) + ]) // { + description = "Boolean, Integer, Float, String, or lists or attribute sets of these types"; + }; + in valueType; +in { + options = { + meta.description = mkOption { + type = types.lines; + default = ""; + internal = true; + }; + + preferences = mkOption { + type = json; + default = {}; + + description = '' + These nested values are translated directly into Firefox preferences, as can be + found in user.js, prefs.js, or about:config. + ''; + + example = { + }; + }; + + policies = mkOption { + type = json; + default = {}; + + description = '' + These nested values must follow the pattern of https://github.com/mozilla/policy-templates/, + but compliance is not validated immediately. + ''; + + example = { + FirefoxHome = { + Pocket = false; + Locked = true; + }; + NewTabPage = false; + }; + }; + + omnija.browser.patchCommand = mkOption { + type = types.lines; + default = ""; + + description = '' + This is a shell script to be executed for patching omni.ja + ''; + }; + }; +} |