aboutsummaryrefslogtreecommitdiffstats
path: root/modules/security/gopass/assertions.nix
blob: 05098453716dd7733a094420437253401ccbf2da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Validates gopass sub-options require the main module to be enabled
{ config, ... }:
let
  cfg = config.security.gopass;
in
{
  assertions = [
    {
      assertion = !cfg.sync.enable || cfg.enable;
      message = "security.gopass.sync.enable requires security.gopass.enable.";
    }
    {
      assertion = !cfg.creation-templates.enable || cfg.enable;
      message = "security.gopass.creation-templates.enable requires security.gopass.enable.";
    }
  ];
}