Rework common profile into module system
This commit is contained in:
parent
9d2e54547c
commit
9fdec35027
29 changed files with 288 additions and 214 deletions
25
modules/smartd.nix
Normal file
25
modules/smartd.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
options.chvp.smartd.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.smartd.enable {
|
||||
chvp.globalMailer.enable = true;
|
||||
environment.systemPackages = [ pkgs.smartmontools ];
|
||||
services.smartd = {
|
||||
enable = true;
|
||||
autodetect = true;
|
||||
notifications = {
|
||||
mail = {
|
||||
enable = true;
|
||||
sender = "${config.networking.hostName}@vanpetegem.me";
|
||||
recipient = "webmaster@vanpetegem.me";
|
||||
};
|
||||
wall.enable = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue