Smartd common module

This commit is contained in:
Chris Dombroski 2024-04-26 12:48:13 -04:00
parent 5bf6776a9d
commit 1285c65914
5 changed files with 12 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

@ -4,6 +4,7 @@
imports = imports =
[ # Include the results of the hardware scan. [ # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
../../modules/common.nix
]; ];
boot.loader.grub.enable = false; boot.loader.grub.enable = false;

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/common.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/common.nix
]; ];
# Use the GRUB 2 boot loader. # Use the GRUB 2 boot loader.