diff --git a/nixos/doc/manual/configuration/config-file.xml b/nixos/doc/manual/configuration/config-file.xml
index b613c7f06cc..9b240979273 100644
--- a/nixos/doc/manual/configuration/config-file.xml
+++ b/nixos/doc/manual/configuration/config-file.xml
@@ -157,7 +157,7 @@ boot.kernel.sysctl."net.ipv4.tcp_keepalive_time" = 60;
fileSystems."/boot" =
{ device = "/dev/sda1";
fsType = "ext4";
- options = "rw,data=ordered,relatime";
+ options = [ "rw" "data=ordered" "relatime" ];
};
diff --git a/nixos/doc/manual/man-nixos-generate-config.xml b/nixos/doc/manual/man-nixos-generate-config.xml
index e4fba4a40a9..140642bc9c9 100644
--- a/nixos/doc/manual/man-nixos-generate-config.xml
+++ b/nixos/doc/manual/man-nixos-generate-config.xml
@@ -165,13 +165,13 @@ look like this:
fileSystems."/" =
{ device = "/dev/disk/by-label/nixos";
fsType = "ext3";
- options = "rw,data=ordered,relatime";
+ options = [ "rw" "data=ordered" "relatime" ];
};
fileSystems."/boot" =
{ device = "/dev/sda1";
fsType = "ext3";
- options = "rw,errors=continue,user_xattr,acl,barrier=1,data=writeback,relatime";
+ options = [ "rw" "errors=continue" "user_xattr" "acl" "barrier=1" "data=writeback" "relatime" ];
};
swapDevices =
diff --git a/nixos/doc/manual/release-notes/rl-unstable.xml b/nixos/doc/manual/release-notes/rl-unstable.xml
index 3d781980369..c814d61bcf4 100644
--- a/nixos/doc/manual/release-notes/rl-unstable.xml
+++ b/nixos/doc/manual/release-notes/rl-unstable.xml
@@ -155,6 +155,23 @@ nginx.override {
rights, new aliasFiles and mapFiles
options and more.
+
+
+ Filesystem options should now be configured as a list of strings, not
+ a comma-separated string. The old style will continue to work, but print a
+ warning, until the 16.09 release. An example of the new style:
+
+
+fileSystems."/example" = {
+ device = "/dev/sdc";
+ fsType = "btrfs";
+ options = [ "noatime" "compress=lzo" "space_cache" "autodefrag" ];
+};
+
+
+
+
+
diff --git a/nixos/modules/installer/cd-dvd/iso-image.nix b/nixos/modules/installer/cd-dvd/iso-image.nix
index 248b0f00283..5702e2d9a1e 100644
--- a/nixos/modules/installer/cd-dvd/iso-image.nix
+++ b/nixos/modules/installer/cd-dvd/iso-image.nix
@@ -249,7 +249,7 @@ in
fileSystems."/" =
{ fsType = "tmpfs";
- options = "mode=0755";
+ options = [ "mode=0755" ];
};
# Note that /dev/root is a symlink to the actual root device
@@ -266,20 +266,20 @@ in
fileSystems."/nix/.ro-store" =
{ fsType = "squashfs";
device = "/iso/nix-store.squashfs";
- options = "loop";
+ options = [ "loop" ];
neededForBoot = true;
};
fileSystems."/nix/.rw-store" =
{ fsType = "tmpfs";
- options = "mode=0755";
+ options = [ "mode=0755" ];
neededForBoot = true;
};
fileSystems."/nix/store" =
{ fsType = "unionfs-fuse";
device = "unionfs";
- options = "allow_other,cow,nonempty,chroot=/mnt-root,max_files=32768,hide_meta_files,dirs=/nix/.rw-store=rw:/nix/.ro-store=ro";
+ options = [ "allow_other" "cow" "nonempty" "chroot=/mnt-root" "max_files=32768" "hide_meta_files" "dirs=/nix/.rw-store=rw:/nix/.ro-store=ro" ];
};
boot.initrd.availableKernelModules = [ "squashfs" "iso9660" "usb-storage" ];
diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl
index 2284eba07a2..ec880e08472 100644
--- a/nixos/modules/installer/tools/nixos-generate-config.pl
+++ b/nixos/modules/installer/tools/nixos-generate-config.pl
@@ -349,7 +349,7 @@ foreach my $fs (read_file("/proc/self/mountinfo")) {
fileSystems.\"$mountPoint\" =
{ device = \"$base$path\";
fsType = \"none\";
- options = \"bind\";
+ options = \[ \"bind\" \];
};
EOF
@@ -409,7 +409,7 @@ EOF
if (scalar @extraOptions > 0) {
$fileSystems .= <mount; defaults to
"auto"), and options
(the mount options passed to mount using the
- flag; defaults to "defaults").
+ flag; defaults to [ "defaults" ]).
Instead of specifying device, you can also
specify a volume label (label) for file
@@ -177,7 +181,7 @@ in
else throw "No device specified for mount point ‘${fs.mountPoint}’.")
+ " " + fs.mountPoint
+ " " + fs.fsType
- + " " + fs.options
+ + " " + builtins.concatStringsSep "," fs.options
+ " 0"
+ " " + (if skipCheck fs then "0" else
if fs.mountPoint == "/" then "1" else "2")
diff --git a/nixos/modules/virtualisation/qemu-vm.nix b/nixos/modules/virtualisation/qemu-vm.nix
index 82b58aa67a3..6e0dc065387 100644
--- a/nixos/modules/virtualisation/qemu-vm.nix
+++ b/nixos/modules/virtualisation/qemu-vm.nix
@@ -427,38 +427,38 @@ in
${if cfg.writableStore then "/nix/.ro-store" else "/nix/store"} =
{ device = "store";
fsType = "9p";
- options = "trans=virtio,version=9p2000.L,cache=loose";
+ options = [ "trans=virtio" "version=9p2000.L" "cache=loose" ];
neededForBoot = true;
};
"/tmp/xchg" =
{ device = "xchg";
fsType = "9p";
- options = "trans=virtio,version=9p2000.L,cache=loose";
+ options = [ "trans=virtio" "version=9p2000.L" "cache=loose" ];
neededForBoot = true;
};
"/tmp/shared" =
{ device = "shared";
fsType = "9p";
- options = "trans=virtio,version=9p2000.L";
+ options = [ "trans=virtio" "version=9p2000.L" ];
neededForBoot = true;
};
} // optionalAttrs cfg.writableStore
{ "/nix/store" =
{ fsType = "unionfs-fuse";
device = "unionfs";
- options = "allow_other,cow,nonempty,chroot=/mnt-root,max_files=32768,hide_meta_files,dirs=/nix/.rw-store=rw:/nix/.ro-store=ro";
+ options = [ "allow_other" "cow" "nonempty" "chroot=/mnt-root" "max_files=32768" "hide_meta_files" "dirs=/nix/.rw-store=rw:/nix/.ro-store=ro" ];
};
} // optionalAttrs (cfg.writableStore && cfg.writableStoreUseTmpfs)
{ "/nix/.rw-store" =
{ fsType = "tmpfs";
- options = "mode=0755";
+ options = [ "mode=0755" ];
neededForBoot = true;
};
} // optionalAttrs cfg.useBootLoader
{ "/boot" =
{ device = "/dev/vdb2";
fsType = "vfat";
- options = "ro";
+ options = [ "ro" ];
noCheck = true; # fsck fails on a r/o filesystem
};
});
diff --git a/nixos/tests/misc.nix b/nixos/tests/misc.nix
index 6297452df95..73af0cfad21 100644
--- a/nixos/tests/misc.nix
+++ b/nixos/tests/misc.nix
@@ -16,7 +16,7 @@ import ./make-test.nix ({ pkgs, ...} : {
systemd.tmpfiles.rules = [ "d /tmp 1777 root root 10d" ];
fileSystems = mkVMOverride { "/tmp2" =
{ fsType = "tmpfs";
- options = "mode=1777,noauto";
+ options = [ "mode=1777" "noauto" ];
};
};
systemd.automounts = singleton
diff --git a/nixos/tests/nfs.nix b/nixos/tests/nfs.nix
index 24f6e0f2ed9..36cd6a39577 100644
--- a/nixos/tests/nfs.nix
+++ b/nixos/tests/nfs.nix
@@ -8,7 +8,7 @@ let
[ { mountPoint = "/data";
device = "server:/data";
fsType = "nfs";
- options = "vers=${toString version}";
+ options = [ "vers=${toString version}" ];
}
];
networking.firewall.enable = false; # FIXME: only open statd