diff options
| author | Arpit Chakladar <arpitchakladar@gmail.com> | 2026-09-24 19:16:14 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar@gmail.com> | 2026-09-24 19:16:14 +0530 |
| commit | f36491c92269d3e1dd241e67c292af762ac498c3 (patch) | |
| tree | 7e36c45915bf83dc7b69e21830cf0c27397c0592 /modules/communication/senpai | |
| parent | f85b86095aa4ea6ac4921b6d37981bffa5c0b711 (diff) | |
| download | home-manager-config-f36491c92269d3e1dd241e67c292af762ac498c3.tar.gz home-manager-config-f36491c92269d3e1dd241e67c292af762ac498c3.zip | |
refactor: some more minor refactoring
Diffstat (limited to 'modules/communication/senpai')
| -rw-r--r-- | modules/communication/senpai/assertions.nix | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/communication/senpai/assertions.nix b/modules/communication/senpai/assertions.nix index 8e74367..0f0a3dc 100644 --- a/modules/communication/senpai/assertions.nix +++ b/modules/communication/senpai/assertions.nix @@ -1,20 +1,20 @@ # Validates Senpai dependencies. { config, ... }: +let + cfg = config.communication.senpai; +in { assertions = [ { - assertion = !config.communication.senpai.enable || config.communication.senpai.server.address != ""; + assertion = !cfg.enable || cfg.server.address != ""; message = "communication.senpai.enable requires communication.senpai.server.address to be set."; } { - assertion = - !config.communication.senpai.enable || config.communication.senpai.identity.nickname != ""; + assertion = !cfg.enable || cfg.identity.nickname != ""; message = "communication.senpai.enable requires communication.senpai.identity.nickname to be set."; } { - assertion = - config.communication.senpai.identity.password-gopass-secret == null - || config.security.gopass.enable; + assertion = cfg.identity.password-gopass-secret == null || config.security.gopass.enable; message = "communication.senpai.identity.password-gopass-secret requires security.gopass.enable."; } ]; |
