nixos/tmp: Fix format of /tmp mount options

The mount options need to be passed as a comma-separated list of options so that they
end up one a single Options line in the resulting mount unit.
The current code passed the options as a list, resulting in several Options lines in
the mount unit, all but the first of these were ignored by systemd however.
This behaviour is not clearly defined in the systemd man page.
This commit is contained in:
Ramses 2022-01-31 12:49:29 +01:00
parent e67d26b0f0
commit 4cea257440

View File

@ -48,7 +48,12 @@ in
what = "tmpfs";
where = "/tmp";
type = "tmpfs";
mountConfig.Options = [ "mode=1777" "strictatime" "rw" "nosuid" "nodev" "size=${toString cfg.tmpOnTmpfsSize}" ];
mountConfig.Options = concatStringsSep "," [ "mode=1777"
"strictatime"
"rw"
"nosuid"
"nodev"
"size=${toString cfg.tmpOnTmpfsSize}" ];
}
];