diff options
Diffstat (limited to 'modules/web')
| -rw-r--r-- | modules/web/chawan/assertions.nix | 5 | ||||
| -rw-r--r-- | modules/web/chromium/assertions.nix | 5 | ||||
| -rw-r--r-- | modules/web/chromium/browserpass.nix | 6 | ||||
| -rw-r--r-- | modules/web/chromium/extensions/assertions.nix | 5 |
4 files changed, 16 insertions, 5 deletions
diff --git a/modules/web/chawan/assertions.nix b/modules/web/chawan/assertions.nix index 93b5fab..3d5bab8 100644 --- a/modules/web/chawan/assertions.nix +++ b/modules/web/chawan/assertions.nix @@ -1,9 +1,12 @@ # Validates kitty is enabled for chawan desktop entry { config, ... }: +let + cfg = config.web.chawan; +in { assertions = [ { - assertion = !config.web.chawan.enable || config.terminal.kitty.enable; + assertion = !cfg.enable || config.terminal.kitty.enable; message = '' web.chawan is enabled but terminal.kitty.enable is not. chawan's desktop entry requires kitty as the terminal launcher. Please enable terminal.kitty. 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. |
