1
0
Fork 0

System: rename primary RAID config to 'storage'

This commit is contained in:
Aires 2024-09-06 15:26:40 -04:00
parent da5b11a042
commit 0f3fe29416
5 changed files with 6 additions and 8 deletions

View file

@ -99,7 +99,7 @@ in
packages = [ start-services ]; packages = [ start-services ];
# Enable support for primary RAID array # Enable support for primary RAID array
raid.sapana.enable = true; raid.storage.enable = true;
# Change how long old generations are kept for. # Change how long old generations are kept for.
retentionPeriod = "30d"; retentionPeriod = "30d";

View file

@ -89,7 +89,7 @@ in
packages = [ start-services ]; packages = [ start-services ];
# Enable support for primary RAID array # Enable support for primary RAID array
raid.sapana.enable = true; raid.storage.enable = true;
# Change how long old generations are kept for. # Change how long old generations are kept for.
retentionPeriod = "30d"; retentionPeriod = "30d";

View file

@ -46,7 +46,7 @@ in
gpu.intel.enable = true; gpu.intel.enable = true;
# Enable support for primary RAID array (just in case) # Enable support for primary RAID array (just in case)
raid.sapana.enable = true; raid.storage.enable = true;
# Change how long old generations are kept for. # Change how long old generations are kept for.
retentionPeriod = "14d"; retentionPeriod = "14d";

View file

@ -58,7 +58,7 @@ in
]; ];
# Enable support for primary RAID array (just in case) # Enable support for primary RAID array (just in case)
raid.sapana.enable = true; raid.storage.enable = true;
# Keep old generations for two weeks. # Keep old generations for two weeks.
retentionPeriod = "14d"; retentionPeriod = "14d";

View file

@ -1,6 +1,4 @@
# Configures bluetooth.
{ lib, config, ... }: { lib, config, ... }:
let let
cfg = config.aux.system.raid; cfg = config.aux.system.raid;
in in
@ -9,13 +7,13 @@ in
options = { options = {
aux.system.raid = { aux.system.raid = {
enable = lib.mkEnableOption "Enables RAID support."; enable = lib.mkEnableOption "Enables RAID support.";
sapana.enable = lib.mkEnableOption "Enables support for the Sapana/storage array."; storage.enable = lib.mkEnableOption "Enables support for the storage array.";
}; };
}; };
config = lib.mkMerge [ config = lib.mkMerge [
(lib.mkIf cfg.enable { boot.swraid.enable = true; }) (lib.mkIf cfg.enable { boot.swraid.enable = true; })
(lib.mkIf cfg.sapana.enable { (lib.mkIf cfg.storage.enable {
aux.system.raid.enable = true; aux.system.raid.enable = true;
boot.swraid.mdadmConf = '' boot.swraid.mdadmConf = ''
ARRAY /dev/md/Sapana metadata=1.2 UUID=51076daf:efdb34dd:bce48342:3b549fcb ARRAY /dev/md/Sapana metadata=1.2 UUID=51076daf:efdb34dd:bce48342:3b549fcb