Skip to content

firefox: fix policies availability#5841

Merged
rycee merged 1 commit intonix-community:masterfrom
bricked-contrib:firefox/fix-policies-availability
Sep 19, 2024
Merged

firefox: fix policies availability#5841
rycee merged 1 commit intonix-community:masterfrom
bricked-contrib:firefox/fix-policies-availability

Conversation

@brckd
Copy link
Copy Markdown
Contributor

@brckd brckd commented Sep 15, 2024

Description

Fixes #5128 (comment). Alltho this hasn't created any issues yet, it makes more sense semantically.

Checklist

  • Change is backwards compatible.

  • Code formatted with ./format.

  • Code tested through nix-shell --pure tests -A run.all or nix develop --ignore-environment .#all using Flakes.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.

Maintainer CC

@rycee @kira-bruneau @brckd

@timon-schelling
Copy link
Copy Markdown
Member

Fixes #5128 (comment). Alltho this hasn't created any issues yet, it makes more sense semantically.

Would become a issue when only providing a unwrapped package to the function. Like I did :)

@rycee rycee force-pushed the firefox/fix-policies-availability branch from 0cf7918 to ce799e2 Compare September 17, 2024 17:22
@rycee
Copy link
Copy Markdown
Member

rycee commented Sep 17, 2024

Unfortunately, as the CI suggests this won't work. Since isWrapped is defined

isWrapped = versionAtLeast config.home.stateVersion "19.09"
  && wrappedPackageName != null;

it depends on the evaluated configuration. So this would introduce a dependency between the option definitions and the final configuration.

Perhaps it is sufficient to have

policies = optionalAttrs (wrappedPackageName != null) (mkOption {});

@brckd
Copy link
Copy Markdown
Contributor Author

brckd commented Sep 17, 2024

Thanks for the comment! I found the CI error hard to understand and didn't know if it was caused by me. I will add the suggested fix tomorrow. As far as I know, the version check was added for backwards compatibility with previous HM versions of FF, so it might be redundant in the generic module anyways.

@brckd brckd force-pushed the firefox/fix-policies-availability branch from ce799e2 to 0206e39 Compare September 18, 2024 15:21
@rycee rycee merged commit 87c7d4d into nix-community:master Sep 19, 2024
@rycee
Copy link
Copy Markdown
Member

rycee commented Sep 19, 2024

Thanks! CI was happier this time so I've merged to master now 🙂

@nyabinary
Copy link
Copy Markdown

Hmm, I have an issue. I don't know if it's my side though when I switched from chaotic-nyx firefox-nightly to nix-community firefox-nightly flake all the policies are not being applied that I set but all the other things I set (not a part of policies) are being applied. I tried nuking my whole profile and Mozilla and cache folder to no avail, policies still not being set.

@brckd
Copy link
Copy Markdown
Contributor Author

brckd commented Dec 28, 2024

Hmm, I have an issue. I don't know if it's my side though when I switched from chaotic-nyx firefox-nightly to nix-community firefox-nightly flake all the policies are not being applied that I set but all the other things I set (not a part of policies) are being applied. I tried nuking my whole profile and Mozilla and cache folder to no avail, policies still not being set.

@nyabinary Seems like you are experiencing #5278. As its first comment points out, policies aren't applied because the nightly package is unwrapped. The suggested solution #5278 (comment) seems to involve chaotic-nyx's wrapFirefox.

@nyabinary
Copy link
Copy Markdown

Hmm, I have an issue. I don't know if it's my side though when I switched from chaotic-nyx firefox-nightly to nix-community firefox-nightly flake all the policies are not being applied that I set but all the other things I set (not a part of policies) are being applied. I tried nuking my whole profile and Mozilla and cache folder to no avail, policies still not being set.

@nyabinary Seems like you are experiencing #5278. As its first comment points out, policies aren't applied because the nightly package is unwrapped. The suggested solution #5278 (comment) seems to involve chaotic-nyx's wrapFirefox.

Hmm, is this something HM can fix or is it on the user side?

@brckd
Copy link
Copy Markdown
Contributor Author

brckd commented Feb 26, 2025

Hmm, I have an issue. I don't know if it's my side though when I switched from chaotic-nyx firefox-nightly to nix-community firefox-nightly flake all the policies are not being applied that I set but all the other things I set (not a part of policies) are being applied. I tried nuking my whole profile and Mozilla and cache folder to no avail, policies still not being set.

@nyabinary Seems like you are experiencing #5278. As its first comment points out, policies aren't applied because the nightly package is unwrapped. The suggested solution #5278 (comment) seems to involve chaotic-nyx's wrapFirefox.

Hmm, is this something HM can fix or is it on the user side?

Sorry for the late reply. It's possible to create a firefox-nightly module for home manager. But I think it's unlikely as long as it would depend on chaotic nyx. For the time being, the user will have to deal with it, but feel free to contribute a solution for home manager.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants