mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-21 16:11:22 +00:00
firefox/wrapper: better way to disable update checks
See https://bugzilla.mozilla.org/show_bug.cgi?id=2042197
This commit is contained in:
@@ -166,36 +166,34 @@ let
|
||||
) (lib.optionals usesNixExtensions nixExtensions);
|
||||
|
||||
enterprisePolicies = {
|
||||
policies = {
|
||||
DisableAppUpdate = true;
|
||||
}
|
||||
// lib.optionalAttrs usesNixExtensions {
|
||||
ExtensionSettings = {
|
||||
"*" = {
|
||||
blocked_install_message = "You can't have manual extension mixed with nix extensions";
|
||||
installation_mode = "blocked";
|
||||
};
|
||||
}
|
||||
// lib.foldr (
|
||||
e: ret:
|
||||
ret
|
||||
// {
|
||||
"${e.extid}" = {
|
||||
installation_mode = "allowed";
|
||||
policies =
|
||||
lib.optionalAttrs usesNixExtensions {
|
||||
ExtensionSettings = {
|
||||
"*" = {
|
||||
blocked_install_message = "You can't have manual extension mixed with nix extensions";
|
||||
installation_mode = "blocked";
|
||||
};
|
||||
}
|
||||
) { } extensions;
|
||||
// lib.foldr (
|
||||
e: ret:
|
||||
ret
|
||||
// {
|
||||
"${e.extid}" = {
|
||||
installation_mode = "allowed";
|
||||
};
|
||||
}
|
||||
) { } extensions;
|
||||
|
||||
Extensions = {
|
||||
Install = lib.foldr (e: ret: ret ++ [ "${e.outPath}/${e.extid}.xpi" ]) [ ] extensions;
|
||||
};
|
||||
}
|
||||
// lib.optionalAttrs smartcardSupport {
|
||||
SecurityDevices = {
|
||||
"OpenSC PKCS#11 Module" = "opensc-pkcs11.so";
|
||||
};
|
||||
}
|
||||
// extraPolicies;
|
||||
Extensions = {
|
||||
Install = lib.foldr (e: ret: ret ++ [ "${e.outPath}/${e.extid}.xpi" ]) [ ] extensions;
|
||||
};
|
||||
}
|
||||
// lib.optionalAttrs smartcardSupport {
|
||||
SecurityDevices = {
|
||||
"OpenSC PKCS#11 Module" = "opensc-pkcs11.so";
|
||||
};
|
||||
}
|
||||
// extraPolicies;
|
||||
};
|
||||
|
||||
mozillaCfg = ''
|
||||
@@ -414,6 +412,9 @@ let
|
||||
ln -sfT "$target" "$out/$l"
|
||||
done
|
||||
|
||||
# Disable update checks
|
||||
touch $out/${libDir}/is-packaged-app
|
||||
|
||||
cd "$out"
|
||||
|
||||
''
|
||||
|
||||
Reference in New Issue
Block a user