aboutsummaryrefslogtreecommitdiffstats
path: root/modules/web/chromium
diff options
context:
space:
mode:
Diffstat (limited to 'modules/web/chromium')
-rw-r--r--modules/web/chromium/assertions.nix5
-rw-r--r--modules/web/chromium/browserpass.nix6
-rw-r--r--modules/web/chromium/extensions/assertions.nix5
3 files changed, 12 insertions, 4 deletions
diff --git a/modules/web/chromium/assertions.nix b/modules/web/chromium/assertions.nix
index 79a9ba1..e999780 100644
--- a/modules/web/chromium/assertions.nix
+++ b/modules/web/chromium/assertions.nix
@@ -1,9 +1,12 @@
# Validates chromium sub-options require the main module to be enabled
{ config, ... }:
+let
+ cfg = config.web.chromium;
+in
{
assertions = [
{
- assertion = !config.web.chromium.use-opengl || config.web.chromium.enable;
+ assertion = !cfg.use-opengl || cfg.enable;
message = "web.chromium.use-opengl requires web.chromium.enable.";
}
];
diff --git a/modules/web/chromium/browserpass.nix b/modules/web/chromium/browserpass.nix
index af430c5..e76f338 100644
--- a/modules/web/chromium/browserpass.nix
+++ b/modules/web/chromium/browserpass.nix
@@ -5,6 +5,8 @@
...
}:
let
+ cfg = config.web.chromium;
+
# Extension ID computed from the pinned extensionKey
patchedHost =
pkgs.runCommand "com.github.browserpass.native.json"
@@ -15,13 +17,13 @@ let
}
''
luajit ${./patch_native_host.lua} \
- ${config.web.chromium.extensions.browserpass.id} \
+ ${cfg.extensions.browserpass.id} \
${config.programs.browserpass.package}/lib/browserpass/hosts/chromium/com.github.browserpass.native.json \
$out
'';
in
{
- config = lib.mkIf (config.web.chromium.enable && config.security.gopass.enable) {
+ config = lib.mkIf (cfg.enable && config.security.gopass.enable) {
programs.browserpass = {
enable = true;
browsers = [ "chromium" ];
diff --git a/modules/web/chromium/extensions/assertions.nix b/modules/web/chromium/extensions/assertions.nix
index 52a0081..afc2659 100644
--- a/modules/web/chromium/extensions/assertions.nix
+++ b/modules/web/chromium/extensions/assertions.nix
@@ -1,8 +1,11 @@
{ config, ... }:
+let
+ cfg = config.web.chromium;
+in
{
assertions = [
{
- assertion = !config.web.chromium.enable || config.file-management.ouch.enable;
+ assertion = !cfg.enable || config.file-management.ouch.enable;
message = ''
web.chromium.enable is true but file-management.ouch.enable is not.
chromium extension fetching requires ouch to decompress extension archives. Please enable file-management.ouch.