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