diff options
| author | Arpit Chakladar <arpitchakladar@gmail.com> | 2026-09-20 04:15:53 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar@gmail.com> | 2026-09-20 04:15:53 +0530 |
| commit | daea646972aa03ce8e58bff2edaed16bf7fbf9db (patch) | |
| tree | 0f0ee033422e456b14b3e012ca8b1a490b77de15 /modules/web | |
| parent | fb442560064f98ee850c71d78330b9b3abda4774 (diff) | |
| download | home-manager-config-daea646972aa03ce8e58bff2edaed16bf7fbf9db.tar.gz home-manager-config-daea646972aa03ce8e58bff2edaed16bf7fbf9db.zip | |
chore: added better assertions for options for submodules
Now setting options for submodules requires the submodule to be enabled
first.
Diffstat (limited to 'modules/web')
| -rw-r--r-- | modules/web/chromium/assertions.nix | 10 | ||||
| -rw-r--r-- | modules/web/chromium/default.nix | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/modules/web/chromium/assertions.nix b/modules/web/chromium/assertions.nix new file mode 100644 index 0000000..465ebbd --- /dev/null +++ b/modules/web/chromium/assertions.nix @@ -0,0 +1,10 @@ +# Validates chromium sub-options require the main module to be enabled +{ config, ... }: +{ + assertions = [ + { + assertion = !config.web.chromium.useOpenGL || config.web.chromium.enable; + message = "web.chromium.useOpenGL requires web.chromium.enable."; + } + ]; +} diff --git a/modules/web/chromium/default.nix b/modules/web/chromium/default.nix index 7901ad6..1e3608c 100644 --- a/modules/web/chromium/default.nix +++ b/modules/web/chromium/default.nix @@ -6,6 +6,7 @@ }: { imports = [ + ./assertions.nix ./browserpass.nix ./extensions ]; |
