Smartd common module

This commit is contained in:
Chris Dombroski 2024-04-26 12:48:13 -04:00
parent 75a9eb891e
commit d44c93a75d
4 changed files with 11 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]));
}

6
modules/smartd.nix Normal 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 = imports =
[ # Include the results of the hardware scan. [ # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
../../modules/smartd.nix
]; ];
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.

View file

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