mirror of
https://github.com/nix-community/disko.git
synced 2026-12-01 21:43:29 +01:00
fix(btrfs): automatic setting of fileSystems
Subvolumes without a mountpoint shouldn't be declared as fileSystems.
This commit is contained in:
1 parent
818207b99b
commit
140edd2d01
1 file changed
+2
-8
+2
-8
@@ -123,14 +123,8 @@
|
|||||||
default = [
|
default = [
|
||||||
(map
|
(map
|
||||||
(subvol:
|
(subvol:
|
||||||
let
|
lib.optional (subvol.mountpoint != null) {
|
||||||
mountpoint =
|
fileSystems.${subvol.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} = {
|
|
||||||
device = config.device;
|
device = config.device;
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = subvol.mountOptions ++ [ "subvol=${subvol.name}" ];
|
options = subvol.mountOptions ++ [ "subvol=${subvol.name}" ];
|
||||||
|
|||||||
Reference in new issue
Block a user