aboutsummaryrefslogtreecommitdiff
path: root/nix/options.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix/options.nix')
-rw-r--r--nix/options.nix66
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
+ '';
+ };
+ };
+}