From 510a38efa932f18f0e82060f04223719d5c48eea Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sat, 7 Dec 2024 18:41:08 +0100 Subject: [PATCH] Add `btrfs` support --- lib/modules/fileSystems/disks.nix | 2 ++ lib/modules/fileSystems/fs.nix | 1 + 2 files changed, 3 insertions(+) diff --git a/lib/modules/fileSystems/disks.nix b/lib/modules/fileSystems/disks.nix index 654efcac..8ed5852f 100644 --- a/lib/modules/fileSystems/disks.nix +++ b/lib/modules/fileSystems/disks.nix @@ -131,6 +131,7 @@ let formatScripts = { ${fs.ext4} = "mkfs.ext4 -F ${partVar}"; + ${fs.btrfs} = "mkfs.btrfs ${partVar}"; ${fs.swap} = "mkswap ${partVar}"; ${fs.ntfs} = "mkfs.ntfs -F ${partVar}"; ${fs.fat32} = "mkfs.fat -F 32 ${partVar}"; @@ -138,6 +139,7 @@ let labelScripts = { ${fs.ext4} = label: "e2label ${partVar} ${label}"; + ${fs.btrfs} = label: "btrfs filesystem label ${partVar} ${label}"; ${fs.swap} = label: "swaplabel ${partVar} --label ${label}"; ${fs.ntfs} = label: "ntfslabel ${partVar} ${label}"; ${fs.fat32} = label: "fatlabel ${partVar} ${label}"; diff --git a/lib/modules/fileSystems/fs.nix b/lib/modules/fileSystems/fs.nix index b75bc3cb..a5656af7 100644 --- a/lib/modules/fileSystems/fs.nix +++ b/lib/modules/fileSystems/fs.nix @@ -1,5 +1,6 @@ { ext4 = "ext4"; + btrfs = "btrfs"; swap = "swap"; ntfs = "ntfs"; fat32 = "fat32";