From 02dd399284480c274225d574ed508de255197a38 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sat, 7 Dec 2024 22:40:59 +0100 Subject: [PATCH] Forcefully write `btrfs` --- lib/modules/fileSystems/btrfs.nix | 2 +- lib/modules/fileSystems/disks.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/modules/fileSystems/btrfs.nix b/lib/modules/fileSystems/btrfs.nix index 82dca6d1..ab12f7e3 100644 --- a/lib/modules/fileSystems/btrfs.nix +++ b/lib/modules/fileSystems/btrfs.nix @@ -67,7 +67,7 @@ in builtins.map ( _: builtins.concatStringsSep " " ( - [ "mkfs.btrfs" ] ++ + [ "mkfs.btrfs" "--force" ] ++ (lib.optionals (_.metadataProfile != null) [ "--metadata" "${_.metadataProfile}" ]) ++ (lib.optionals (_.dataProfile != null) [ "--data" "${_.dataProfile}" ]) ++ (lib.optionals (_.label != null) [ "--label" "${_.label}" ]) ++ diff --git a/lib/modules/fileSystems/disks.nix b/lib/modules/fileSystems/disks.nix index 82bf9f51..03b51e4c 100644 --- a/lib/modules/fileSystems/disks.nix +++ b/lib/modules/fileSystems/disks.nix @@ -132,7 +132,7 @@ let formatScripts = { ${fs.ext4} = "mkfs.ext4 -F ${partVar}"; - ${fs.btrfs} = "mkfs.btrfs ${partVar}"; + ${fs.btrfs} = "mkfs.btrfs --force ${partVar}"; ${fs.swap} = "mkswap ${partVar}"; ${fs.ntfs} = "mkfs.ntfs -F ${partVar}"; ${fs.fat32} = "mkfs.fat -F 32 ${partVar}";