summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLassulus <github@lassul.us>2022-12-23 19:26:23 +0100
committerGitHub <noreply@github.com>2022-12-23 19:26:23 +0100
commit9e0142ae0583f8f28bcc06de49432addac26bcc3 (patch)
tree54d23b67c545b65a2d16f9e830e4a29505f5d571
parent8ae729e9be221bfc9fe4ade4195f42f8d4f2e757 (diff)
parent71a30f9e74141918e98a6bb6457dc97f158d988e (diff)
Merge pull request #84 from lilyinstarlight/fix/mountOptions
-rw-r--r--example/complex.nix2
-rw-r--r--example/luks-lvm.nix4
-rw-r--r--example/lvm-raid.nix2
-rw-r--r--example/zfs-over-legacy.nix2
-rw-r--r--types.nix20
5 files changed, 14 insertions, 16 deletions
diff --git a/example/complex.nix b/example/complex.nix
index 590dd9b..b361196 100644
--- a/example/complex.nix
+++ b/example/complex.nix
@@ -109,7 +109,7 @@
type = "filesystem";
format = "ext4";
mountpoint = "/ext4_on_lvm";
- options = [
+ mountOptions = [
"defaults"
];
};
diff --git a/example/luks-lvm.nix b/example/luks-lvm.nix
index af1c4a3..a6879ce 100644
--- a/example/luks-lvm.nix
+++ b/example/luks-lvm.nix
@@ -17,7 +17,7 @@
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
- options = [
+ mountOptions = [
"defaults"
];
};
@@ -52,7 +52,7 @@
type = "filesystem";
format = "ext4";
mountpoint = "/";
- options = [
+ mountOptions = [
"defaults"
];
};
diff --git a/example/lvm-raid.nix b/example/lvm-raid.nix
index 8622238..70ea197 100644
--- a/example/lvm-raid.nix
+++ b/example/lvm-raid.nix
@@ -89,7 +89,7 @@
type = "filesystem";
format = "ext4";
mountpoint = "/";
- options = [
+ mountOptions = [
"defaults"
];
};
diff --git a/example/zfs-over-legacy.nix b/example/zfs-over-legacy.nix
index 974af35..8e02b00 100644
--- a/example/zfs-over-legacy.nix
+++ b/example/zfs-over-legacy.nix
@@ -17,7 +17,7 @@
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
- options = [
+ mountOptions = [
"defaults"
];
};
diff --git a/types.nix b/types.nix
index a65f2c1..91cc7c1 100644
--- a/types.nix
+++ b/types.nix
@@ -266,7 +266,7 @@ rec {
};
mountOptions = mkOption {
type = types.listOf types.str;
- default = [];
+ default = [ "defaults" ];
};
_meta = mkOption {
internal = true;
@@ -323,7 +323,7 @@ rec {
};
mountOptions = mkOption {
type = types.listOf types.str;
- default = [];
+ default = [ "defaults" ];
};
subvolumes = mkOption {
type = types.listOf optionTypes.pathname;
@@ -376,6 +376,7 @@ rec {
fileSystems.${config.mountpoint} = {
device = dev;
fsType = "btrfs";
+ options = config.mountOptions;
};
}];
};
@@ -400,11 +401,7 @@ rec {
};
mountOptions = mkOption {
type = types.listOf types.str;
- default = [];
- };
- options = mkOption {
- type = types.listOf types.str;
- default = [];
+ default = [ "defaults" ];
};
mountpoint = mkOption {
type = optionTypes.absolute-pathname;
@@ -450,6 +447,7 @@ rec {
fileSystems.${config.mountpoint} = {
device = dev;
fsType = config.format;
+ options = config.mountOptions;
};
}];
};
@@ -932,7 +930,7 @@ rec {
};
mountOptions = mkOption {
type = types.listOf types.str;
- default = [];
+ default = [ "defaults" ];
};
datasets = mkOption {
type = types.attrsOf zfs_dataset;
@@ -990,7 +988,7 @@ rec {
fileSystems.${config.mountpoint} = {
device = config.name;
fsType = "zfs";
- options = lib.optional ((config.options.mountpoint or "") != "legacy") "zfsutil";
+ options = config.mountOptions ++ lib.optional ((config.options.mountpoint or "") != "legacy") "zfsutil";
};
})
];
@@ -1024,7 +1022,7 @@ rec {
};
mountOptions = mkOption {
type = types.listOf types.str;
- default = [];
+ default = [ "defaults" ];
};
# filesystem options
@@ -1086,7 +1084,7 @@ rec {
fileSystems.${config.mountpoint} = {
device = "${zpool}/${config.name}";
fsType = "zfs";
- options = lib.optional ((config.options.mountpoint or "") != "legacy") "zfsutil";
+ options = config.mountOptions ++ lib.optional ((config.options.mountpoint or "") != "legacy") "zfsutil";
};
});
};