Add jupiter storage

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-07-01 01:30:15 +01:00
parent 68e6eddd22
commit 88ef04def8
6 changed files with 123 additions and 71 deletions

View File

@@ -85,60 +85,68 @@
};
};
# TODO: Set to correct device
# storage0 = {
# device = "/dev/vdb";
# type = "disk";
# content = {
# type = "gpt";
# partitions = {
# root = {
# name = "root";
# size = "100%";
# content = {
# name = "storage0";
# type = "luks";
# passwordFile = "/tmp/keyfile";
# settings = {
# allowDiscards = true;
# };
# };
# };
# };
# };
# };
storage0 = {
device = "/dev/disk/by-id/ata-TOSHIBA_MG08ACA16TE_51K0A2KEFWTG";
type = "disk";
content = {
type = "gpt";
partitions = {
root = {
name = "root";
size = "100%";
content = {
name = "storage0";
type = "luks";
passwordFile = "/tmp/keyfile";
settings = {
allowDiscards = true;
};
};
};
};
};
};
# TODO: Set to correct device
# storage1 = {
# device = "/dev/vdc";
# type = "disk";
# content = {
# type = "gpt";
# partitions = {
# root = {
# name = "root";
# size = "100%";
# content = {
# name = "storage1";
# type = "luks";
# passwordFile = "/tmp/keyfile";
# settings = {
# allowDiscards = true;
# };
storage1 = {
device = "/dev/disk/by-id/ata-TOSHIBA_MG08ACA16TE_51K0A1WVFWTG";
type = "disk";
content = {
type = "gpt";
partitions = {
root = {
name = "root";
size = "100%";
content = {
name = "storage1";
type = "luks";
passwordFile = "/tmp/keyfile";
settings = {
allowDiscards = true;
};
# # storageN content must be placed on last alphabetical drive
# content = {
# type = "btrfs";
# extraArgs = [ "-f -L storage -m raid1 -d raid1 /dev/mapper/storage0" ];
# subvolumes = {
# "@" = { };
# };
# };
# };
# };
# };
# };
# };
content = {
type = "btrfs";
extraArgs = [ "-f -L storage -m raid1 -d raid1 /dev/mapper/storage0" ];
subvolumes =
let
mountOptions = [
"compress=zstd:5"
"noatime"
"user_subvol_rm_allowed"
];
in
{
"@" = {
mountpoint = "/mnt/storage";
inherit mountOptions;
};
};
};
};
};
};
};
};
};
};
}