aboutsummaryrefslogtreecommitdiff
path: root/profiles/addons/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'profiles/addons/default.nix')
-rw-r--r--profiles/addons/default.nix36
1 files changed, 33 insertions, 3 deletions
diff --git a/profiles/addons/default.nix b/profiles/addons/default.nix
index 0e1827f..0253026 100644
--- a/profiles/addons/default.nix
+++ b/profiles/addons/default.nix
@@ -1,17 +1,24 @@
-{ lib, fetchurl }:
+{ pkgs, lib, fetchurl, runCommand }:
let
# Extension IDs are used as keys, see .applications.gecko.id in manifest.json
- addon = { id, url, sha256, settings ? null }: {
+ localAddon = { id, src, settings ? null }: {
policies = {
ExtensionSettings.${id} = {
installation_mode = "force_installed";
- install_url = "file://${fetchurl { inherit url sha256; }}";
+ install_url = "file://${src}";
};
} // (lib.optionalAttrs (settings != null) {
"3rdparty".Extensions.${id} = settings;
});
};
+
+ addon = { id, url, sha256, settings ? null }: localAddon {
+ inherit id settings;
+ src = fetchurl {
+ inherit url sha256;
+ };
+ };
in {
# This can be safe-ish, if extension installation is also disabled
disableExtensionSignatureChecking.preferences = {
@@ -40,6 +47,29 @@ in {
settings.adminSettings = builtins.readFile ./ublock/config.json;
};
+ qwantjunior = localAddon {
+ id = "qwantjunior@search.mozilla.org";
+ src = runCommand "addon.xpi" { nativeBuildInputs = [ pkgs.zip ]; } ''
+ SRC=${./qwantsearch}
+ cd $SRC
+ zip -r $out .
+ '';
+
+ settings.settings = {
+ searchRegionKey = "DE";
+ searchLanguageKey = "de";
+ interfaceLanguageKey = "de_de";
+ };
+ };
+
+ qwantjuniorSystem.policies = {
+ "3rdparty".Extensions."qwantjunior@search.mozilla.org".settings = {
+ searchRegionKey = "DE";
+ searchLanguageKey = "de";
+ interfaceLanguageKey = "de_de";
+ };
+ };
+
/*
borderify.policies = {
ExtensionSettings."borderify@example.com" = {