Skip to content
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

nixos/firefox: init #174975

Merged
merged 1 commit into from Nov 11, 2022
Merged

nixos/firefox: init #174975

merged 1 commit into from Nov 11, 2022

Conversation

danth
Copy link
Contributor

@danth danth commented May 27, 2022

Description of changes

Added a module which allows Firefox preferences and policies to be set in the NixOS configuration.

I know this can already be done by overriding the package, however:

  • Package overrides are not discoverable on https://search.nixos.org (I've used NixOS for around 1 year and only just found out that the Firefox wrapper supports this)
  • Having a proper NixOS option allows other modules to add their policies, for example the IPFS module could optionally enable the IPFS companion extension
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@danth
Copy link
Contributor Author

danth commented May 27, 2022

@mweinelt @lovesegfault I'm requesting review since you are maintainers of the existing Firefox package. Would you like to be added to the maintainers list of this module, too, if it is merged?

@mweinelt
Copy link
Member

I really think home-manager is the better place for a firefox module.

https://github.com/nix-community/home-manager/blob/master/modules/programs/firefox.nix

@linsui
Copy link
Contributor

linsui commented Sep 25, 2022

HM has its own problem and it's not official. I don't want to use HM but I want to config Firefox in my nixos config. For single-user system the module system just works and it can also be used as a system-wide default config for a multi-user system.

@danth
Copy link
Contributor Author

danth commented Sep 25, 2022

Also, this creates a policy which prevents the settings from being overridden, which could be useful to an organisation.

There is already a module like this for Chromium so I think it makes sense to add the Firefox equivalent.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/any-chance-to-have-a-firefox-module-in-nixos/23125/1

@AndersonTorres
Copy link
Member

@danth ping

@nbp
Copy link
Member

nbp commented Nov 10, 2022

For a single user, HM can be used as documented in the Wiki: https://nixos.wiki/wiki/Home_Manager#Usage_as_a_NixOS_module
However, it does make sense for computers managed by a sys-admin, where users might not have the right to delegate to the nix daemon, to setup Firefox with various set of policies dedicated to Enterprise users.

@AndersonTorres
Copy link
Member

Is anyone interested on fixing the git conflicts?

@danth
Copy link
Contributor Author

danth commented Nov 10, 2022

@AndersonTorres Conflicts are fixed now.

@AndersonTorres
Copy link
Member

Now I need someone to test it and someone to fix ofborg's complaint :)

@danth
Copy link
Contributor Author

danth commented Nov 10, 2022

Converted the docs to Markdown. That should have fixed the errors regarding the manual

@AndersonTorres
Copy link
Member

God bless programs.firefox!

@AndersonTorres AndersonTorres merged commit d48d7a6 into NixOS:master Nov 11, 2022
@danth danth deleted the firefox-module branch November 11, 2022 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants