From c312692abe6441fc8e9ac21f76a607e9f2cfb3f7 Mon Sep 17 00:00:00 2001 From: Sk7Str1pe <159684143+Sk7Str1pe@users.noreply.github.com> Date: Thu, 26 Sep 2024 16:56:32 +0300 Subject: [PATCH] Create luks-btrfs-raid.nix --- example/luks-btrfs-raid.nix | 52 +++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 example/luks-btrfs-raid.nix diff --git a/example/luks-btrfs-raid.nix b/example/luks-btrfs-raid.nix new file mode 100644 index 0000000..cbcce8e --- /dev/null +++ b/example/luks-btrfs-raid.nix @@ -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=/" + ]; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; +}