Don't require a device for tmpfs filesystems

This commit is contained in:
Eelco Dolstra 2014-07-30 13:15:29 +02:00
parent 94ce6ec866
commit f94f659a31
3 changed files with 3 additions and 5 deletions

View file

@ -179,7 +179,6 @@ in
fileSystems."/" = fileSystems."/" =
{ fsType = "tmpfs"; { fsType = "tmpfs";
device = "none";
options = "mode=0755"; options = "mode=0755";
}; };
@ -201,7 +200,6 @@ in
fileSystems."/nix/.rw-store" = fileSystems."/nix/.rw-store" =
{ fsType = "tmpfs"; { fsType = "tmpfs";
device = "none";
options = "mode=0755"; options = "mode=0755";
neededForBoot = true; neededForBoot = true;
}; };

View file

@ -9,7 +9,7 @@ let
prioOption = prio: optionalString (prio !=null) " pri=${toString prio}"; prioOption = prio: optionalString (prio !=null) " pri=${toString prio}";
fileSystemOpts = { name, ... }: { fileSystemOpts = { name, config, ... }: {
options = { options = {
@ -68,6 +68,7 @@ let
config = { config = {
mountPoint = mkDefault name; mountPoint = mkDefault name;
device = mkIf (config.fsType == "tmpfs") config.fsType;
}; };
}; };

View file

@ -12,8 +12,7 @@ import ./make-test.nix {
services.nixosManual.enable = mkOverride 0 true; services.nixosManual.enable = mkOverride 0 true;
systemd.tmpfiles.rules = [ "d /tmp 1777 root root 10d" ]; systemd.tmpfiles.rules = [ "d /tmp 1777 root root 10d" ];
fileSystems = mkVMOverride { "/tmp2" = fileSystems = mkVMOverride { "/tmp2" =
{ device = "none"; { fsType = "tmpfs";
fsType = "tmpfs";
options = "mode=1777,noauto"; options = "mode=1777,noauto";
}; };
}; };