fix(btrfs): automatic setting of fileSystems

Subvolumes without a mountpoint shouldn't be declared as fileSystems.
This commit is contained in:
rogarb 2023-07-24 19:22:48 +02:00 committed by mergify[bot]
parent 818207b99b
commit 140edd2d01

View file

@ -123,14 +123,8 @@
default = [
(map
(subvol:
let
mountpoint =
if (subvol.mountpoint != null) then subvol.mountpoint
else if (config.mountpoint == null) then subvol.name
else null;
in
lib.optional (mountpoint != null) {
fileSystems.${mountpoint} = {
lib.optional (subvol.mountpoint != null) {
fileSystems.${subvol.mountpoint} = {
device = config.device;
fsType = "btrfs";
options = subvol.mountOptions ++ [ "subvol=${subvol.name}" ];