mirror of
https://github.com/nix-community/disko.git
synced 2026-11-30 13:03:28 +01:00
Create luks-btrfs-raid.nix
This commit is contained in:
1 parent
037be88911
commit
c312692abe
1 file changed
+52
@@ -0,0 +1,52 @@
|
||||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
disk0 = {
|
||||
type = "disk";
|
||||
device = "/dev/sdb";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
crypted2 = {
|
||||
name = "crypt_raidp2";
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "raidp2"; # this is DM name
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
disk1 = {
|
||||
type = "disk";
|
||||
device = "/dev/sda";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
crypted1 = {
|
||||
size = "100%";
|
||||
name = "crypt_raidp1";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "raidp1";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" "-m raid1 -d raid1" "/dev/mapper/raidp2"]; # raidp2 - DM name of 2nd disk
|
||||
subvolumes = {
|
||||
"/" = {
|
||||
mountpoint = "/mnt/SoftWare";
|
||||
mountOptions = [
|
||||
"rw" "relatime" "ssd" "discard=async" "space_cache=v2" "subvolid=5" "subvol=/"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user