Set "services.smartd.enable = true" to enable the service. svn path=/nixos/trunk/; revision=27767wip/yesman
parent
e056880dc4
commit
fb1b0c0372
@ -0,0 +1,48 @@ |
||||
{ config, pkgs, ... }: |
||||
|
||||
with pkgs.lib; |
||||
|
||||
let |
||||
|
||||
cfg = config.services.smartd; |
||||
|
||||
in |
||||
|
||||
{ |
||||
###### interface |
||||
|
||||
options = { |
||||
|
||||
services.smartd = { |
||||
|
||||
enable = mkOption { |
||||
default = false; |
||||
type = types.bool; |
||||
example = "true"; |
||||
description = '' |
||||
Run smartd from the smartmontools package. |
||||
''; |
||||
}; |
||||
|
||||
}; |
||||
|
||||
}; |
||||
|
||||
|
||||
###### implementation |
||||
|
||||
config = mkIf cfg.enable { |
||||
|
||||
jobs.smartd = |
||||
{ description = "S.M.A.R.T. Daemon"; |
||||
|
||||
startOn = "started syslogd"; |
||||
|
||||
daemonType = "daemon"; |
||||
|
||||
exec = "${pkgs.smartmontools}/sbin/smartd"; |
||||
}; |
||||
|
||||
}; |
||||
|
||||
} |
Loading…
Reference in new issue