diff options
Diffstat (limited to 'modules/office/calcurse')
| -rw-r--r-- | modules/office/calcurse/assertions.nix | 10 | ||||
| -rw-r--r-- | modules/office/calcurse/default.nix | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/modules/office/calcurse/assertions.nix b/modules/office/calcurse/assertions.nix new file mode 100644 index 0000000..65805fe --- /dev/null +++ b/modules/office/calcurse/assertions.nix @@ -0,0 +1,10 @@ +# Validates calcurse sub-options require the main module to be enabled +{ config, ... }: +{ + assertions = [ + { + assertion = !config.office.calcurse.sync.enable || config.office.calcurse.enable; + message = "office.calcurse.sync.enable requires office.calcurse.enable."; + } + ]; +} diff --git a/modules/office/calcurse/default.nix b/modules/office/calcurse/default.nix index 2b0a19f..90e4699 100644 --- a/modules/office/calcurse/default.nix +++ b/modules/office/calcurse/default.nix @@ -41,6 +41,8 @@ let }; in { + imports = [ ./assertions.nix ]; + options.office.calcurse = { enable = lib.mkEnableOption "Enables calcurse."; package = lib.mkOption { |
