Smartd common module

This commit is contained in:
Chris Dombroski 2024-04-26 12:48:13 -04:00
parent 5bf6776a9d
commit bc41bff294
3 changed files with 10 additions and 0 deletions

3
modules/common.nix Normal file
View file

@ -0,0 +1,3 @@
{...}: {
imports = builtins.map (n: toString ./common + "/${n}") (builtins.attrNames (builtins.removeAttrs (builtins.readDir ./common) [(builtins.unsafeGetAttrPos "_" {_ = null;}).file]));
}

View file

@ -0,0 +1,6 @@
{...}: {
services.smartd = {
enable = true;
defaults.monitored = "-a -o on -s (S/../.././02|L/../../7/04)";
};
}

View file

@ -8,6 +8,7 @@
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
../../modules/common.nix
];
# Use the systemd-boot EFI boot loader.