-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Firefox configuration tracking issue (+Thunderbird?) #606
Comments
Autoconf: This is the firefox code relating to this "autoconfig" stuff https://dxr.mozilla.org/mozilla-central/source/extensions/pref/autoconfig ❗https://bugzilla.mozilla.org/show_bug.cgi?id=1438247 It needs to be clarified whether the new Windows Group Policy Objects based stuff will be present in parallel to MCD, or whether MCD will be phased out and removed, and we will be left with the (currently?) crippled GPO stuff. If Autoconfig is a viable option, how stable are the firefox config APIs? Do numeric constants change? (e.g. Bugzillas: (note these dont show closed issues, need to edit the search) Note: there are mentions of LDAP support, changig these files only has results on next start of firefox (?) |
@wsmwk @mkaply can you shed some light on the above? I would very much appreciate not needing to poke in the dark. :) I am looking for a way to do per-profile firefox configuration on linux, with tools (here: Nix) externally imposing configuration settings on firefox, say, by adding a generated "autoconfigure" file. |
A common problem with all of those options appears to be that it tries really hard to resolve configuration files relative to the real executable. That defeats the usual methods for configuration through wrapping. I am also interested in configuring firefox through nix. |
Another possible (but rather hacky) solution for this problem is to use user namespaces and bind mounts to work around that. I have a proof of concept script here. |
@xaverdh I must have forgotten to mention it, but because autoconf is a js file, it might be possible to just have a global autoconfig that lets you set an environment variable to load further configuration from. IIRC the documentation explicitly suggests the possibility of using env vars. Now, I don't know if this is a good idea, but it sounds like it could work well. In analogy to the emacs stuff I've been working on, you'd have a site-start.el (a "site-specific configuration file run by emacs before the rest of its init process) that calls out to a path set in an environment variable. (also unsure whether that is a good idea, but it works as a first prototype) |
Ok, my hope is to get some more customizability into the firefox wrapper itself. |
Thunderbird policies is just not something on our radar right now. As you found, you can use autoconfig to customize thunderbird (Not to be confused with the thunderbird autoconfig server for configuring email servers). |
Though I guess given how nix in general works, it's probably fine to have config stuff set in the firefox root because we can easily just generate new ones? and I think total rebuilds of firefox / wasting disk space could be avoided by just using symlinkJoin or something like that? |
Just want to say that it is very nice of you to put some effort into Firefox configuration. At some point I had a quick look at it but gave up quite quickly 😀 I'll help in what way I can. For what it's worth, I've added an option |
Meanwhile I just realized this might be helpful for anything else in this ecosystem like zotero. (?) |
I just merged #719, which adds some profile handling and generation of |
A very rough implementation for generating a string from a nested attribute set in that style: #nix eval -f attrtostr.nix a
with import <nixpkgs> {};
#Huh, this implementation coincidentally ignores options that are empty sets.
let
wot = {
a = {
b = 1;
};
b = 2;
c = {};
d = "asd";
e.f.g = 3;
};
dropLeadingDot = s: builtins.substring 1 (builtins.stringLength s) s;
typeCase = v: ifrec: ifval:
if (builtins.typeOf v == "set")
then ifrec
else ifval;
ifVal = acc: v: "${acc}=${builtins.toString v}";
m = acc: a:
let
acc' = n: "${acc}.${n}";
in
#TODO this is a deprecated function
lib.mapAttrsFlatten (n: v: typeCase v (m (acc' n) v) (ifVal (acc' n) v)) a;
in {
a = lib.traceValSeq ("\n" + (lib.concatMapStringsSep "\n" dropLeadingDot (lib.flatten (m "" wot))));
} |
Some stuff about profile up- aand down-grades for more recent foxes: https://discourse.nixos.org/t/why-does-the-following-setup-reset-firefox/4129 I didn't really look into it. |
How to import Firefox bookmarks without GUI: https://stackoverflow.com/a/35804955/3057764 |
@rycee FYI in my current [General]
StartWithLastProfile=1
Version=2 Your generated ini currently doesn't generate that ( home-manager/modules/programs/firefox.nix Lines 47 to 49 in cf5dad7
|
Lol how about no |
I hope this is an appropriate place for this.
A bit of a brain dump till further notice, I've heard of people working on this but only by proxy so...:
References: [all being researched, will be cleaned later, inconsistencies likely]
Nixpkgs issues:
Upstream (firefox):
firefox enterprise seems to support some crippled config methods for group policy, luckily there's also a cross platform policies.json, the limited things they do support look helpful
,
Note:
TODO: check bugzilla (mostly relating to "autoconfig", just for starters there are some interesting things here https://bugzilla.mozilla.org/show_bug.cgi?id=1455601
Current verdict: look into "autoconfig"
keywords: autoadmin, autoconfig.jsc, failover.jsc, MCD, Autoconfig, Mission Control Desktop,
The text was updated successfully, but these errors were encountered: