From e678e086344b9dcfb20183f0cbd35fc4c8d7078a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Numbus?= Date: Wed, 25 Feb 2026 10:53:24 +0100 Subject: [PATCH] Added spindownDisksList list to provide the HDD spindown capable list. Tried to fix mkPodmanService error. --- modules/hardware/disks.nix | 6 ++++++ modules/misc/power.nix | 2 +- modules/services/lib.nix | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/hardware/disks.nix b/modules/hardware/disks.nix index fcb533b..6e1acee 100644 --- a/modules/hardware/disks.nix +++ b/modules/hardware/disks.nix @@ -225,6 +225,12 @@ in example = [ "/dev/disk/by-id/nvme_SAMSUNG_MZVPYEHCO_159Ejz224G0000" "/dev/disk/by-id/ata-San_Disk_159Ejz224G" ]; description = "List of by-id path of devices for boot disks"; }; + spindownDisksList = mkOption { + type = types.listOf types.str; + default = []; + example = [ "/dev/disk/by-id/WD_Blue_ATO431_159Ejz224G0000382b" "/dev/disk/by-id/Seagate_Barracuda_159Ejz224G" ]; + description = "List of by-id path of devices to spindown when inactive to save power (HDD only)"; + }; swapSize = mkOption { type = types.str; default = "16G"; diff --git a/modules/misc/power.nix b/modules/misc/power.nix index 178d970..399bba4 100644 --- a/modules/misc/power.nix +++ b/modules/misc/power.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: let - hardDrives = config.numbus.hardware.dataDisksList ++ config.numbus.hardware.parityDisksList; + hardDrives = config.numbus.hardware.spindownDisksList; in { diff --git a/modules/services/lib.nix b/modules/services/lib.nix index be8f098..874bfa3 100644 --- a/modules/services/lib.nix +++ b/modules/services/lib.nix @@ -23,6 +23,7 @@ with lib; generatedSecrets ? {}, importedSecrets ? {}, envFile ? null, + ... }: let