nix-community / home-manager

Manage a user environment using Nix [maintainer=@rycee]
https://nix-community.github.io/home-manager/
MIT License
6.8k stars 1.78k forks source link

Chromium module should support settings like the nixos-module #3677

Open JohannesRudolph opened 1 year ago

JohannesRudolph commented 1 year ago

The nix-os chromium module has a couple very useful settings like defaultSearchProviderURL and similar as well as the extraOpts for setting chromium settings.

Unfortunately the home-manager module only exposes the extensions attribute but not theses other settings. Would it be possible to add them so I can configure chromium through home-manager like I can through the nixos-module?

Or should I just use chromium via configuration.nix instead then (which kinda diminishes the point for home-manager from my PoV). Or can I use home-manager to just use the nixos-module? Sorry if I appear confused, I'm still learning about home-manager and nixos.

ncfavier commented 1 year ago

Shouldn't be too complicated to add at least extraOpts, AFAICT the NixOS module just writes a JSON file. PRs welcome!

stale[bot] commented 1 year ago

Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

* If this is resolved, please consider closing it so that the maintainers know not to focus on this. * If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

If you are not the original author of the issue

* If you are also experiencing this issue, please add details of your situation to help with the debugging process. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

Memorandum on closing issues

Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.

karaolidis commented 2 months ago

It seems that Chromium only looks for policies in /etc/chromium/policies which home-manager does not have access to :/

https://github.com/chromium/chromium/blob/7de736facb918bbd4e5dbb4610fdc0536634d3bb/components/policy/core/common/policy_paths.cc#L21

I think creating a patch for chromium itself to also look in e.g. .config/chromium/policies might be a bit overkill, but I can work on it if people find it useful.