nixos-generate-config: preserve vfat filesystem mount permissions

The default is to mount these world-readable, but that's a security risk
for the EFI System Partition.

Ref https://github.com/NixOS/nixpkgs/issues/279362.

+11
+11
nixos/modules/installer/tools/nixos-generate-config.pl
··· 453 } 454 } 455 456 # is this a stratis fs? 457 my $stableDevPath = findStableDevPath $device; 458 my $stratisPool;
··· 453 } 454 } 455 456 + # Preserve umask (fmask, dmask) settings for vfat filesystems. 457 + # (The default is to mount these world-readable, but that's a security risk 458 + # for the EFI System Partition.) 459 + if ($fsType eq "vfat") { 460 + for (@superOptions) { 461 + if ($_ =~ /fmask|dmask/) { 462 + push @extraOptions, $_; 463 + } 464 + } 465 + } 466 + 467 # is this a stratis fs? 468 my $stableDevPath = findStableDevPath $device; 469 my $stratisPool;