1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-06 00:51:04 +01:00
Commit graph

74 commits

Author SHA1 Message Date
Benedikt Rips
2318e30ea1 tests: hostPlatform -> stdenv.hostPlatform 2025-11-03 07:59:03 -06:00
Austin Horstman
bcccb01d0a tests/firefox: change test case to verify we handle missing addonId
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-10-10 08:40:00 -05:00
musjj
c7f4214fac firefox: new permission checks for extensions
Add two new options to customize how extension permissions are checked:

- `extensions.exhaustivePermissions`
  Ensures that the permissions requested by all extensions managed by
  home-manager are authorized
- `extensions.exactPermissions`
  When enabled, the user must authorize only the permissions that the
  extensions requests, not more nor less.
2025-10-09 21:06:28 -05:00
bricked
d52da303ef
firefox: add extension permissions (#7402)
Adds extension permissions as suggested in
https://github.com/nix-community/home-manager/issues/7001.
Adds the 'profiles.<name>.extensions.settings.<name>.permissions' to Firefox
derivatives. If set, this option adds an assertion that fails if an extension
package requests permissions that weren't added to the permissions option. In
order to not require 'profiles.<name>.extensions.force' to be set when only
permissions, but no extension settings were defined, the relevant assertions
were changed. They now check whether any 'extensions.settings.<name>.settings'
was set instead of checking whether 'extensions.settings' was set.

---------

Co-authored-by: Robert Helgesson <robert@rycee.net>
Co-authored-by: awwpotato <awwpotato@voidq.com>
2025-07-10 15:33:18 -05:00
Austin Horstman
fd9e55f5fa tests/firefox: add bookmark policy to profile bookmarks test
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-07-06 12:50:40 -05:00
Yiheng He
89af52d9a8 tests/firefox: add extension user.js test 2025-07-02 15:59:50 -05:00
Austin Horstman
06c1392ca8 tests: implement auto importing for modules
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-06-22 23:58:37 -05:00
Austin Horstman
0f355844e5
tests/firefox: fix bookmarks test (#7292)
Not run in CI so didn't notice. We had a shared file. But, now attrset
and list differ in what they can generate. Separate the expected test
files.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-06-18 14:39:32 -05:00
xaltsc
0edffd088e
firefox: allow separators in bookmarks (#7284)
Allow users to create separators in their Firefox bookmarks.

Co-authored-by: xaltsc <hey@xaltsc.dev>
2025-06-16 15:51:11 -05:00
Ihar Hrachyshka
75268f6252
tests: enable all firefox tests on darwin (plus derivations) (#6960) 2025-05-03 10:51:18 -05:00
K900
abfad3d295 treewide: substituteAll -> replaceVars/substitute
substituteAll is now officially deprecated.
2025-04-24 13:40:11 +02:00
Austin Horstman
c42f04c83f
mkFirefoxModule: revert userChrome changes (#6887)
Reverting all the recent userChrome changes because of too many issues
and bikeshedding.
2025-04-22 20:44:48 -05:00
Austin Horstman
991a480472
mkFirefoxModule: userchrome support derivations (#6844) 2025-04-18 19:57:48 -05:00
Austin Horstman
72526a5f7c
tests/firefox: fix test commands (#6840)
Tests passed, but looks like `nmt` was swallowing the command not found
errors.
2025-04-17 14:45:55 -05:00
Austin Horstman
2c71aae678 tests/firefox: validate folder linking
Make sure we're linking all folder contents when a directory is
provided.
2025-04-17 08:01:20 -07:00
Austin Horstman
baa2a0b3bd tests/firefox: consolidate userChrome.css test files
Not sure why I had two of them..
2025-04-17 08:01:20 -07:00
Austin Horstman
c3c91dd8b4
mkFirefoxModule: fix userChrome with leading comment (#6836)
userChrome lines that started with a leading comment would cause an eval failure.
2025-04-17 09:31:27 -05:00
Austin Horstman
c6b75d69b6 tests/firefox: add userchrome test cases 2025-04-16 12:57:22 -07:00
Austin Horstman
cba2f9ce95 treewide: reformat nixfmt-rfc-style
Reformat repository using new nixfmt-rfc-style.
2025-04-08 08:50:05 -07:00
Kira Bruneau
4f4538467f
firefox: fix migrate search v7 test for all firefox forks (#6690) 2025-03-23 16:36:33 -05:00
bricked
62d6a8931e firefox: fix bookmarks backwards compatibility
The legacy attrset option type for `firefox.profiles.<name>.bookmarks`
was accidentally removed in 9d55428. This adds back support for this
type by refactoring the bookmarks submodule. This also adds a new test
ensuring this won't happen again.
2025-03-23 14:04:01 -05:00
Austin Horstman
94605dcade
tests/firefox: add applicationName to mock (#6668) 2025-03-20 00:15:57 -05:00
Kira Bruneau
8b629b5424 firefox: migrate search config to v12 2025-03-19 15:16:09 -05:00
Kira Bruneau
b44d79a5b2 firefox: migrate search config to v11 2025-03-19 15:16:09 -05:00
Kira Bruneau
c1dc900a1a firefox: migrate search config to v7 2025-03-19 15:16:09 -05:00
Kira Bruneau
9d554281e0
firefox: refactor bookmarks into a submodule & require force (#6402)
This splits the bookmarks submodule into a seperate file, to make it easier to maintain (like how the search module was previously split out in #5697).

This also refactors bookmarks to require a new force option, to be more explicit about overriding existing bookmarks.
2025-03-19 13:37:13 -05:00
Austin Horstman
95711f9266
treewide: remove with lib (#6512)
* nixos: remove with lib
* nix-darwin: remove with lib
* home-manager: remove with lib
* modules/accounts: remove with lib
* modules/config: remove with lib
* modules/i18n: remove with lib
* modules/misc: remove with lib
* modules: remove with lib
* modules/targets: remove with lib
* tests/modules/firefox: remove with lib
* tests/modules/services: remove with lib
2025-03-07 14:16:46 -06:00
Ihar Hrachyshka
6b7cd50812 tests: test librewolf the same way firefox is tested
Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
2025-02-22 17:38:43 -08:00
Ihar Hrachyshka
7f9ba30a28 tests: check that all firefox derivatives can be installed
The issue itself was resolved with:
https://github.com/nix-community/home-manager/pull/6460

This patch only adds a test case to make sure we don't ever regress by
installing firefox and librewolf and floorp at the same time.

Closes: #6467

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
2025-02-22 17:38:43 -08:00
Austin Horstman
439a125afe
tests: remove with lib (#6511) 2025-02-21 23:20:07 -06:00
Austin Horstman
e495cd8c80
tests/firefox: add profiles-extensions (#6510)
Wasn't actually running test because it wasn't included. Also had to fix
test after some of the recent changes.
2025-02-21 22:41:22 -06:00
Ihar Hrachyshka
1a78a4c7fe firefox: fix build failure when package is null
Native messaging hosts module assumed all hosts are packages, and we
were passing null before.

The patch also adds a test case for a null firefox package to avoid
regressions in the future for this common (on Darwin at least) scenario.

Note: Thunderbird doesn't need a similar change because it doesn't allow
a null package.

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
2025-02-21 09:28:22 -08:00
HPsaucii
27ffa35178 firefox: add support for configuring extensions
This commit refactors programs.firefox.profiles.<name>.extensions in
order to support both installation of extensions (addons) and their
configuration. It does this by setting the
`extensions.webextensions.ExtensionStorageIDB.enabled` user_pref to
false.

When this preference is set to false, support for storing extension
settings in sqlite databases, also known as IndexedDB or IDB, is
reverted back to the JSON format present in firefox versions prior to
version 63, as seen here:
https://blog.mozilla.org/addons/2018/08/03/new-backend-for-storage-local-api/

IndexedDB was made the default due to performance improvements, but had
the consequence of removing any possibility of declarative extension
configuration without the assistance of firefox's policy system. The
policy system is supported by a small amount of extensions, such as
uBlock Origin, but has to be explicitly supported. Even when supported,
it provides significantly less granular control when compared to the
JSON storage format.
2025-02-17 12:17:38 -08:00
Kira Bruneau
15bd673658
firefox: remove old unused test file (#6403) 2025-02-06 12:00:06 +01:00
Robert Helgesson
7a3f0b3b8d
tests: rework derivation stubbing
Instead of having to manually stub packages that should not be
downloaded we instead automatically stub all packages (except a small
list of whitelisted ones). Tests can re-introduce the real package by
using the `realPkgs` module argument.
2025-02-04 23:58:20 +01:00
Danil Suetin
0ee8bfdd04
firefox: add preConfig
Add `preConfig`, which acts like `extraConfig`, but placed before
`settings`. This will allow to overwrite settings in `preConfig`,
using `settings` option.
2025-01-29 18:36:43 +01:00
Andrew Marshall
bd530df4e2
firefox: avoid unnecessarily overriding package
When `cfg.package` is already wrapped, and wrapped without the
`ExtensionSettings` key set, this would always add that key, even if its
value was blank. This would result in `cfg.finalPackage` being a
functionally-identical, but differently-input-addressed package. This is
generally undesirable as it may result in multiple derivations being
built, and also if the value of `cfg.package` is expected to be
unchanged by the user (e.g. because they want it to be consistent
between NixOS and HM configuration).

Add a test to ensure this does not regress in the default case. Only
test on newish stateVersion since the logic for `isWrapped` differs on
older versions.
2025-01-29 18:29:44 +01:00
Scharada
122f70545b
firefox: change container.json version to 5 2024-10-19 09:02:11 +02:00
Austin Horstman
346973b338
tests/firefox: add shared path test
Used to make sure that profiles that share a common generated path still
build properly.
2024-10-18 08:31:24 -05:00
Kilian Mio
2b13611eae
floorp: add module
Also fix tests for Firefox module derivatives.
2024-10-12 00:21:33 +02:00
Kira Bruneau
271c83e21e
firefox: organize tests by submodule (#5698)
Split off from #5697, organizes firefox tests by submodule.

This is intended to match directory structure setup for the new search submodule.
2024-10-07 23:06:52 +02:00
bricked
792757f643
firefox: support firefox derivatives
Adds support for Firefox forks by introducing methods that create
generic configs and options. Additional configs and options can be
added in separate modules.
2024-07-28 23:53:08 +02:00
Robert Helgesson
a204082274
firefox: fix test 2024-04-20 00:02:59 +02:00
a-kenji
f46814ec7c
treewide: prefer the official wiki 2024-04-17 23:58:16 +02:00
Ryan Horiguchi
03958aff44
firefox: add default containers 2024-01-25 23:08:09 +01:00
Damien Cassou
bf4b576f84
firefox: restore compatibility for extraPolicies
This commit makes it possible to specify Firefox' extraPolicies
through:

    programs.firefox.package = pkgs.firefox.override {
      extraPolicies = {... }
    }

This was possible in the past but was broken by:

  3feeb77155
  firefox: add support for specifying policies (#4626)
2024-01-16 09:04:30 +01:00
0x5a4
ac7216918c
firefox: fix folders not showing in toolbar
Fixes #4568
2023-12-04 23:14:01 +01:00
Damien Cassou
3feeb77155
firefox: add support for specifying policies (#4626) 2023-11-17 23:54:39 +01:00
Chuang Zhu
280721186a
firefox: support setting a separate default search engine in private browsing (#4114)
* firefox: support setting a separate default search engine in private browing

Ref: https://searchfox.org/mozilla-central/rev/05d1afda588e54be73e31ef4e022dde91f1ed97a/toolkit/components/search/SearchSettings.sys.mjs#548

* Update modules/programs/firefox.nix

---------

Co-authored-by: Naïm Favier <n@monade.li>
2023-11-12 11:11:12 +01:00
Damien Cassou
54586daa59
firefox: add container support 2023-11-11 00:34:21 +01:00