diff options
author | Nikolay Amiantov <ab@fmap.me> | 2016-09-07 02:55:26 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2016-09-07 02:55:48 +0300 |
commit | aed2cd32f8069ae114a82b25648c5e67c060ae39 (patch) | |
tree | 31364b2ed5442b5061837d6cb79e0f26fe52eb9a /nixos/modules/tasks/filesystems.nix | |
parent | 9a0535248891e8104f53a7098241900eff8beb3f (diff) |
nixos containers: hopefully fix test failures
Closes #18377.
Diffstat (limited to 'nixos/modules/tasks/filesystems.nix')
-rw-r--r-- | nixos/modules/tasks/filesystems.nix | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nixos/modules/tasks/filesystems.nix b/nixos/modules/tasks/filesystems.nix index a66ece1020f8..3c822c8716d0 100644 --- a/nixos/modules/tasks/filesystems.nix +++ b/nixos/modules/tasks/filesystems.nix @@ -286,11 +286,15 @@ in # Sync mount options with systemd's src/core/mount-setup.c: mount_table. boot.specialFileSystems = { "/proc" = { fsType = "proc"; options = [ "nosuid" "noexec" "nodev" ]; }; - "/sys" = { fsType = "sysfs"; options = [ "nosuid" "noexec" "nodev" ]; }; "/run" = { fsType = "tmpfs"; options = [ "nodev" "strictatime" "mode=755" "size=${config.boot.runSize}" ]; }; "/dev" = { fsType = "devtmpfs"; options = [ "nosuid" "strictatime" "mode=755" "size=${config.boot.devSize}" ]; }; "/dev/shm" = { fsType = "tmpfs"; options = [ "nosuid" "nodev" "strictatime" "mode=1777" "size=${config.boot.devShmSize}" ]; }; "/dev/pts" = { fsType = "devpts"; options = [ "nosuid" "noexec" "mode=620" "gid=${toString config.ids.gids.tty}" ]; }; + } // optionalAttrs (!config.boot.isContainer) { + # systemd-nspawn populates /sys by itself, and remounting it causes all + # kinds of weird issues (most noticeably, waiting for host disk device + # nodes). + "/sys" = { fsType = "sysfs"; options = [ "nosuid" "noexec" "nodev" ]; }; }; }; |