feat: added per service enable options for impermanence configs
This commit is contained in:
parent
a8af8930fa
commit
89793fca6a
15 changed files with 120 additions and 15 deletions
|
|
@ -6,7 +6,14 @@
|
|||
dataFolder = "/var/lib/fail2ban";
|
||||
dataFile = "fail2ban.sqlite3";
|
||||
in {
|
||||
config = lib.mkIf (config.services.fail2ban.enable && config.host.impermanence.enable) {
|
||||
options.services.fail2ban = {
|
||||
impermanence.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = config.services.fail2ban.enable && config.host.impermanence.enable;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.services.fail2ban.impermanence.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = config.services.fail2ban.daemonSettings.Definition.dbfile == "${dataFolder}/${dataFile}";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue