System: clean up RAID definition
This commit is contained in:
parent
3c92a4ac15
commit
d82ad4efbc
|
@ -12,14 +12,15 @@ in
|
|||
options = {
|
||||
${namespace}.raid = {
|
||||
enable = lib.mkEnableOption "Enables RAID support.";
|
||||
mailAddr = lib.mkOption {
|
||||
default = "";
|
||||
type = lib.types.str;
|
||||
description = "Address to email in case of issues.";
|
||||
example = "admin@example.com";
|
||||
};
|
||||
|
||||
storage = {
|
||||
enable = lib.mkEnableOption "Enables support for the storage array.";
|
||||
mailAddr = lib.mkOption {
|
||||
default = "";
|
||||
type = lib.types.str;
|
||||
description = "Address to email in case of issues.";
|
||||
example = "admin@example.com";
|
||||
};
|
||||
keyFile = lib.mkOption {
|
||||
default = "";
|
||||
type = lib.types.str;
|
||||
|
@ -36,7 +37,7 @@ in
|
|||
${namespace}.raid.enable = true;
|
||||
boot.swraid.mdadmConf = ''
|
||||
ARRAY /dev/md/Sapana metadata=1.2 UUID=51076daf:efdb34dd:bce48342:3b549fcb
|
||||
MAILADDR ${cfg.storage.mailAddr}
|
||||
MAILADDR ${cfg.mailAddr}
|
||||
'';
|
||||
|
||||
# Auto-unlock RAID array with a key file
|
||||
|
|
|
@ -115,10 +115,13 @@ in
|
|||
gpu.amd.enable = true;
|
||||
|
||||
# Enable support for primary RAID array
|
||||
raid.storage = {
|
||||
raid = {
|
||||
enable = true;
|
||||
keyFile = config.${namespace}.secrets.devices.storage.keyFile.path;
|
||||
mailAddr = config.${namespace}.secrets.users.aires.email;
|
||||
storage = {
|
||||
enable = true;
|
||||
keyFile = config.${namespace}.secrets.devices.storage.keyFile.path;
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
|
|
|
@ -53,9 +53,6 @@ in
|
|||
|
||||
powerManagement.enable = true;
|
||||
|
||||
# Enable support for primary RAID array (just in case)
|
||||
raid.storage.enable = true;
|
||||
|
||||
services = {
|
||||
autoUpgrade = {
|
||||
enable = true;
|
||||
|
|
|
@ -53,9 +53,6 @@ in
|
|||
keepassxc # Use native instead of Flatpak due to weird performance issues
|
||||
];
|
||||
|
||||
# Enable support for primary RAID array (just in case)
|
||||
raid.storage.enable = true;
|
||||
|
||||
# Keep one week of generations.
|
||||
nix.retention = "7d";
|
||||
|
||||
|
|
Loading…
Reference in a new issue