diff --git a/modules/common.nix b/modules/common.nix new file mode 100644 index 0000000..9c49a37 --- /dev/null +++ b/modules/common.nix @@ -0,0 +1,3 @@ +{...}: { + imports = builtins.map (n: toString ./common + "/${n}") (builtins.attrNames (builtins.removeAttrs (builtins.readDir ./common) [(builtins.unsafeGetAttrPos "_" {_ = null;}).file])); +} diff --git a/modules/smartd.nix b/modules/smartd.nix new file mode 100644 index 0000000..fd3b154 --- /dev/null +++ b/modules/smartd.nix @@ -0,0 +1,6 @@ +{...}: { + services.smartd = { + enable = true; + defaults.monitored = "-a -o on -s (S/../.././02|L/../../7/04)"; + }; +} diff --git a/systems/smolboi/configuration.nix b/systems/smolboi/configuration.nix index 8bf1ef3..bb807f5 100644 --- a/systems/smolboi/configuration.nix +++ b/systems/smolboi/configuration.nix @@ -8,6 +8,7 @@ imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix + ../../modules/smartd.nix ]; # Use the systemd-boot EFI boot loader. diff --git a/systems/zeus/configuration.nix b/systems/zeus/configuration.nix index 4db1cbd..2aeccc8 100644 --- a/systems/zeus/configuration.nix +++ b/systems/zeus/configuration.nix @@ -8,6 +8,7 @@ imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix + ../../modules/smartd.nix ]; # Use the GRUB 2 boot loader.