Skip to content

Commit da8f492

Browse files
iFreilichtmergify[bot]
authored andcommitted
docs: Fix /boot security hole warning in examples
The alternative would be to do this automatically if format=="vfat" and mountpoint=="/boot", but it's better to be upfront about this. Fixes #527
1 parent 6c5ba9e commit da8f492

24 files changed

+29
-20
lines changed

docs/HowTo.md

+1
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ or with pinning:
150150
type = "filesystem";
151151
format = "vfat";
152152
mountpoint = "/boot";
153+
mountOptions = [ "umask=0077" ];
153154
};
154155
};
155156
root = {

docs/disko-install.md

+2
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ example we assume a system that has been booted with EFI:
6565
type = "filesystem";
6666
format = "vfat";
6767
mountpoint = "/boot";
68+
mountOptions = [ "umask=0077" ];
6869
};
6970
};
7071
root = {
@@ -168,6 +169,7 @@ Add this to your flake.nix output:
168169
type = "filesystem";
169170
format = "vfat";
170171
mountpoint = "/boot";
172+
mountOptions = [ "umask=0077" ];
171173
};
172174
};
173175
root = {

docs/table-to-gpt.md

+1
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ The fixed disko configuration would look like this:
122122
type = "filesystem";
123123
format = "vfat";
124124
mountpoint = "/boot";
125+
mountOptions = [ "umask=0077" ];
125126
};
126127
};
127128
root = {

example/bcachefs.nix

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
type = "filesystem";
1515
format = "vfat";
1616
mountpoint = "/boot";
17+
mountOptions = [ "umask=0077" ];
1718
};
1819
};
1920
root = {

example/btrfs-only-root-subvolume.nix

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
type = "filesystem";
1818
format = "vfat";
1919
mountpoint = "/boot";
20+
mountOptions = [ "umask=0077" ];
2021
};
2122
};
2223
root = {

example/btrfs-subvolumes.nix

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
type = "filesystem";
1818
format = "vfat";
1919
mountpoint = "/boot";
20+
mountOptions = [ "umask=0077" ];
2021
};
2122
};
2223
root = {

example/complex.nix

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
type = "filesystem";
1616
format = "vfat";
1717
mountpoint = "/boot";
18+
mountOptions = [ "umask=0077" ];
1819
};
1920
};
2021
};

example/f2fs.nix

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
type = "filesystem";
1515
format = "vfat";
1616
mountpoint = "/boot";
17+
mountOptions = [ "umask=0077" ];
1718
};
1819
};
1920
root = {

example/hybrid-mbr.nix

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
type = "filesystem";
3030
format = "vfat";
3131
mountpoint = "/boot";
32+
mountOptions = [ "umask=0077" ];
3233
};
3334
};
3435
root = {

example/hybrid-tmpfs-on-root.nix

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
type = "filesystem";
1919
format = "vfat";
2020
mountpoint = "/boot";
21+
mountOptions = [ "umask=0077" ];
2122
};
2223
};
2324
nix = {

example/hybrid.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
type = "filesystem";
1919
format = "vfat";
2020
mountpoint = "/boot";
21+
mountOptions = [ "umask=0077" ];
2122
};
2223
};
2324
root = {
@@ -34,4 +35,3 @@
3435
};
3536
};
3637
}
37-

example/long-device-name.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
type = "filesystem";
1616
format = "vfat";
1717
mountpoint = "/boot";
18+
mountOptions = [ "umask=0077" ];
1819
};
1920
};
2021
root = {
@@ -31,4 +32,3 @@
3132
};
3233
};
3334
}
34-

example/luks-btrfs-subvolumes.nix

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414
type = "filesystem";
1515
format = "vfat";
1616
mountpoint = "/boot";
17-
mountOptions = [
18-
"defaults"
19-
];
17+
mountOptions = [ "umask=0077" ];
2018
};
2119
};
2220
luks = {

example/luks-interactive-login.nix

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
type = "filesystem";
1515
format = "vfat";
1616
mountpoint = "/boot";
17+
mountOptions = [ "umask=0077" ];
1718
};
1819
};
1920
luks = {

example/luks-lvm.nix

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414
type = "filesystem";
1515
format = "vfat";
1616
mountpoint = "/boot";
17-
mountOptions = [
18-
"defaults"
19-
];
17+
mountOptions = [ "umask=0077" ];
2018
};
2119
};
2220
luks = {

example/lvm-sizes-sort.nix

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
type = "filesystem";
1515
format = "vfat";
1616
mountpoint = "/boot";
17+
mountOptions = [ "umask=0077" ];
1718
};
1819
};
1920
primary = {

example/lvm-thin.nix

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414
type = "filesystem";
1515
format = "vfat";
1616
mountpoint = "/boot";
17-
mountOptions = [
18-
"defaults"
19-
];
17+
mountOptions = [ "umask=0077" ];
2018
};
2119
};
2220
primary = {

example/non-root-zfs.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
type = "filesystem";
1515
format = "vfat";
1616
mountpoint = "/boot";
17+
mountOptions = [ "umask=0077" ];
1718
};
1819
};
1920
root = {
@@ -106,4 +107,3 @@
106107
};
107108
};
108109
}
109-

example/simple-efi.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
type = "filesystem";
1515
format = "vfat";
1616
mountpoint = "/boot";
17+
mountOptions = [ "umask=0077" ];
1718
};
1819
};
1920
root = {
@@ -30,4 +31,3 @@
3031
};
3132
};
3233
}
33-

example/swap.nix

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
type = "filesystem";
1515
format = "vfat";
1616
mountpoint = "/boot";
17+
mountOptions = [ "umask=0077" ];
1718
};
1819
};
1920
root = {

example/tmpfs.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
type = "filesystem";
1515
format = "vfat";
1616
mountpoint = "/boot";
17+
mountOptions = [ "umask=0077" ];
1718
};
1819
};
1920
root = {
@@ -38,4 +39,3 @@
3839
};
3940
};
4041
}
41-

example/zfs-over-legacy.nix

+1-4
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414
type = "filesystem";
1515
format = "vfat";
1616
mountpoint = "/boot";
17-
mountOptions = [
18-
"defaults"
19-
];
17+
mountOptions = [ "umask=0077" ];
2018
};
2119
};
2220
primary = {
@@ -57,4 +55,3 @@
5755
};
5856
};
5957
}
60-

example/zfs-with-vdevs.nix

+5-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
type = "filesystem";
1515
format = "vfat";
1616
mountpoint = "/boot";
17+
mountOptions = [ "umask=0077" ];
1718
};
1819
};
1920
zfs = {
@@ -84,7 +85,10 @@
8485
vdev = [
8586
{
8687
mode = "mirror";
87-
members = [ "x" "y" ];
88+
members = [
89+
"x"
90+
"y"
91+
];
8892
}
8993
];
9094
special = {

example/zfs.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
type = "filesystem";
1515
format = "vfat";
1616
mountpoint = "/boot";
17+
mountOptions = [ "umask=0077" ];
1718
};
1819
};
1920
zfs = {
@@ -102,4 +103,3 @@
102103
};
103104
};
104105
}
105-

0 commit comments

Comments
 (0)