Librewolf 138 "programs.firefox.policies" is still broken

hellooooooooooo everyone!! :smiley:

so um, i reeeeeeeally dont wanna be that person but…

this? this is NOT fixed. i am still over here with a completely wiped and broken browser… a week ago something terrible happened and people lost their data, and those who installed librewolf afterwards couldnt apply their declarative settings! well… im both.

also that, over there, yeah… sorry, im just really really impatient, i know, i “should be waiting for the may release” or “just use the stable version”… but i CANT. i need this, like, right now… like i had this crazy declarative config that i wrote, only for it to be broken (compiling, but not functional) the next day, you know? it makes me sad…

anyway, as i said in the aforementioned discourse thread, it does, indeed, create a /etc/firefox/policies/policies.json but… it does nothing. at all. and i dont know what to do in this situation. so umm… help?

also, im not sure if programs.firefox.policies supports programs.firefox.policies.Preferences anymore and you should do programs.firefox.preferences instead… this is VEEEEERY confusing… :sob:

for example, there people ARE using programs.firefox.policies.Preferences, but… what’s the difference anymore…? mind boggling…

so um, any news on this, please please please??

P.S. unstable-small, 25.05

There’s no difference, programs.firefox.preferences gets added to programs.firefox.policies.Preferences anyway:

1 Like

okay okay, okay… BUTTHISDOESNT… sorry, but this doesnt explain… why it no workey? or no workie… ahem, neither policies, nor preferences apply to librewolf? :sob: :sob:

As explained above, programs.firefox.preferences is just a slightly more convenient way to set programs.firefox.policies.Preferences settings. The end result is the same.

I suspect that librewolf just doesn’t check /etc/firefox/policies/policies.json which is where the nixos module for firefox (programs.firefox) outputs (a symlink to) the policies file. It may look somewhere like /etc/librewolf/ instead.

I’m pretty sure all of your issues stem from using librewolf instead of firefox with this module.

Even if you got this to work with librewolf, be aware that only a certain subset of settings can be set this way (policy-templates | Policy Templates for Firefox)

I don’t think the nixpkgs issue you linked is relevant to the issue here either, as that seems to be about the profile path in a users home directory, which the nixos module doesn’t touch.

just so you know… I’m on the exact same situation lol

and now all my cookie exceptions don’t work anymore but at least I’m not alone as I thought I was :smiling_face_with_tear:

also, @aloop

I’m pretty sure all of your issues stem from using librewolf instead of firefox with this module.

I mean… yes? but it’s not like setting up policies for librewolf with this module didn’t work before. something just broke

I don’t think the nixpkgs issue you linked is relevant to the issue here either, as that seems to be about the profile path in a users home directory, which the nixos module doesn’t touch.

I’m not a nix expert or anything, but the one thing I can say about this is that the policies did work before the bad PR mentioned on the issue got merged.

the only thing that has been fixed is the extension declaration.

1 Like

If that’s the case, one might be able to set

environment.etc."firefox/policies/policies.json".target = "librewolf/policies/policies.json";
1 Like

phew… thats nice to hear!!

nope, that also does not work…

that… doesnt even compile:

error: The option `environment.etc."firefox/policies/policies.json".source' was accessed but has no value defined. Try setting the option.

no idea what’s it trying to tell me - but it literally IS an option??

Are you using programs.firefox.policies? The environment.etc option depends on it.

1 Like

sry i was just updating and reinstalling librewolf… TO NO AVAIL! nothing changed! :partying_face: :tada:

ehh? why? why are you asking that lol? YES!! yes, i am… i think its literally… in the title?! :smiley: :smiley: :smiley: :open_mouth: :exploding_head:

WAIT A MINUTE. it just compiled!!! the environment.etc."firefox/policies/policies.json".target = "librewolf/policies/policies.json"; thing worked!!!

what? how? why???

okay guys, it worked. all i did is delete $HOME/.librewolf folder (you probably should back it up), then uninstall librewolf with programs.firefox.enable = false; (which has package = pkgs.librewolf;) - DO NOT keep the symlink uncommented (which is how i got that previous option error), so comment it out, THEN, when everything has been deleted, uncomment the aforementioned symlink, then install librewolf back again with a true

unless i am only seeing the extensions, let me see what is missing… nevermind, that is actually everything!!! :crazy_face: :partying_face: :tada: :tada: :piñata: :dancer: :dancer:

well. thank you all very much. no idea what to do with this problem, though, i mean it still exists, right? some kind of orphaned symlink?

I wasn’t aware that it was working before. My point was that I wouldn’t expect that it should work, considering the path that it outputs policies.json to.

Glad you got it to work

1 Like

okay… i did some testing. everything works, except… locale settings. i could be doing something wrong, but… out of all these:

programs.firefox.languagePacks = [
  "nl"
  "en-GB"
];
programs.firefox.policies.RequestedLocales = [
  "nl"
  "en-GB"
];
# programs.firefox.preferences."intl.accept_languages"
# or
programs.firefox.policies.Preferences."intl.accept_languages" = [
  "nl"
  "en-GB"
];
# programs.firefox.preferences."intl.locale.requested"
# or
programs.firefox.policies.Preferences."intl.locale.requested" = [
  "nl"
  "en-GB"
];

the "intl.accept_languages" seem to not work - it is still its default en-US, en, and it is literally the only thing that is needed to change the interface locale (EDIT: nope)… just to be clear: it DID use to work before, i remember it asking for the “keep it in english locale to prevent sites from tracking?” or something like that. anyway, i will try to rewrite that preference in a literal string. brb…

EDIT: right… so:

# programs.firefox.preferences."intl.accept_languages"
# or
programs.firefox.policies.Preferences."intl.accept_languages" = "nl,en-GB";

and

# programs.firefox.preferences."intl.locale.requested"
# or
programs.firefox.policies.Preferences."intl.locale.requested" = "nl,en-GB";

these preferences work now, but the interface is still in en-US… which is at least interesting, they actually want you to provide a json string value… i guess i got too comfortable :D. anyway, i still have to figure out how to change the interface language declaratively… sigh

EDIT2: welp. i’ve got nothing. with or without, they just stopped working. you can only change it manually in the language settings > select a language to add… ughhh. whatever, i guess. it’s better for the privacy to not stand out with a different locale anyway :smiley: :+1:

EDIT3: MAYBE, there is a slight chance that PERHAPS i have something in my about:config preferences now that is BLOCKING the downloading of language packs or something, i am not sure, and i will never figure this out because these preferences are extremely vague and cryptic themselves…