Fix capitalisation

Changed files
+21 -21
nixos
modules
system
boot
loader
grub
+21 -21
nixos/modules/system/boot/loader/grub/grub.nix
···
realGrub = if cfg.version == 1 then pkgs.grub
else if cfg.zfsSupport then pkgs.grub2.override { zfsSupport = true; }
-
else if cfg.enableTrustedboot then pkgs.trustedGrub
else pkgs.grub2;
grub =
···
description = ''
The devices on which the boot loader, GRUB, will be
installed. Can be used instead of <literal>device</literal> to
-
install grub into multiple devices (e.g., if as softraid arrays holding /boot).
'';
};
···
example = "/boot1";
type = types.str;
description = ''
-
The path to the boot directory where grub will be written. Generally
-
this boot parth should double as an efi path.
'';
};
···
example = [ "/dev/sda" "/dev/sdb" ];
type = types.listOf types.str;
description = ''
-
The path to the devices which will have the grub mbr written.
Note these are typically device paths and not paths to partitions.
'';
};
···
type = types.lines;
description = ''
Additional bash commands to be run at the script that
-
prepares the grub menu entries.
'';
};
···
example = "1024x768";
type = types.str;
description = ''
-
The gfxmode to pass to grub when loading a graphical boot interface under efi.
'';
};
···
example = "auto";
type = types.str;
description = ''
-
The gfxmode to pass to grub when loading a graphical boot interface under bios.
'';
};
···
type = types.addCheck types.str
(type: type == "uuid" || type == "label" || type == "provided");
description = ''
-
Determines how grub will identify devices when generating the
configuration file. A value of uuid / label signifies that grub
will always resolve the uuid or label of the device before using
-
it in the configuration. A value of provided means that grub will
use the device name as show in <command>df</command> or
<command>mount</command>. Note, zfs zpools / datasets are ignored
and will always be mounted using their labels.
···
default = false;
type = types.bool;
description = ''
-
Whether grub should be build against libzfs.
ZFS support is only available for GRUB v2.
This option is ignored for GRUB v1.
'';
···
default = false;
type = types.bool;
description = ''
-
Whether grub should be build with EFI support.
EFI support is only available for GRUB v2.
This option is ignored for GRUB v1.
'';
···
default = false;
type = types.bool;
description = ''
-
Enable support for encrypted partitions. Grub should automatically
unlock the correct encrypted partition and look for filesystems.
'';
};
-
enableTrustedboot = mkOption {
default = false;
type = types.bool;
description = ''
-
Enable trusted boot. Grub will measure all critical components during
the boot process to offer TCG (TPM) support.
'';
};
···
assertions = [
{
assertion = !cfg.zfsSupport || cfg.version == 2;
-
message = "Only grub version 2 provides zfs support";
}
{
assertion = cfg.mirroredBoots != [ ];
···
message = "You cannot have duplicated devices in mirroredBoots";
}
{
-
assertion = !cfg.enableTrustedboot || cfg.version == 2;
message = "Trusted GRUB is only available for GRUB 2";
}
{
-
assertion = !cfg.efiSupport || !cfg.enableTrustedboot;
message = "Trusted GRUB does not have EFI support";
}
{
-
assertion = !cfg.zfsSupport || !cfg.enableTrustedboot;
message = "Trusted GRUB does not have ZFS support";
}
{
-
assertion = !cfg.enableTrustedboot;
message = "Trusted GRUB can break your system. Remove assertion if you want to test trustedGRUB nevertheless.";
}
] ++ flip concatMap cfg.mirroredBoots (args: [
···
}
] ++ flip map args.devices (device: {
assertion = device == "nodev" || hasPrefix "/" device;
-
message = "Grub devices must be absolute paths, not ${dev} in ${args.path}";
}));
})
···
realGrub = if cfg.version == 1 then pkgs.grub
else if cfg.zfsSupport then pkgs.grub2.override { zfsSupport = true; }
+
else if cfg.enableTrustedBoot then pkgs.trustedGrub
else pkgs.grub2;
grub =
···
description = ''
The devices on which the boot loader, GRUB, will be
installed. Can be used instead of <literal>device</literal> to
+
install GRUB onto multiple devices.
'';
};
···
example = "/boot1";
type = types.str;
description = ''
+
The path to the boot directory where GRUB will be written. Generally
+
this boot path should double as an EFI path.
'';
};
···
example = [ "/dev/sda" "/dev/sdb" ];
type = types.listOf types.str;
description = ''
+
The path to the devices which will have the GRUB MBR written.
Note these are typically device paths and not paths to partitions.
'';
};
···
type = types.lines;
description = ''
Additional bash commands to be run at the script that
+
prepares the GRUB menu entries.
'';
};
···
example = "1024x768";
type = types.str;
description = ''
+
The gfxmode to pass to GRUB when loading a graphical boot interface under EFI.
'';
};
···
example = "auto";
type = types.str;
description = ''
+
The gfxmode to pass to GRUB when loading a graphical boot interface under BIOS.
'';
};
···
type = types.addCheck types.str
(type: type == "uuid" || type == "label" || type == "provided");
description = ''
+
Determines how GRUB will identify devices when generating the
configuration file. A value of uuid / label signifies that grub
will always resolve the uuid or label of the device before using
+
it in the configuration. A value of provided means that GRUB will
use the device name as show in <command>df</command> or
<command>mount</command>. Note, zfs zpools / datasets are ignored
and will always be mounted using their labels.
···
default = false;
type = types.bool;
description = ''
+
Whether GRUB should be build against libzfs.
ZFS support is only available for GRUB v2.
This option is ignored for GRUB v1.
'';
···
default = false;
type = types.bool;
description = ''
+
Whether GRUB should be build with EFI support.
EFI support is only available for GRUB v2.
This option is ignored for GRUB v1.
'';
···
default = false;
type = types.bool;
description = ''
+
Enable support for encrypted partitions. GRUB should automatically
unlock the correct encrypted partition and look for filesystems.
'';
};
+
enableTrustedBoot = mkOption {
default = false;
type = types.bool;
description = ''
+
Enable trusted boot. GRUB will measure all critical components during
the boot process to offer TCG (TPM) support.
'';
};
···
assertions = [
{
assertion = !cfg.zfsSupport || cfg.version == 2;
+
message = "Only GRUB version 2 provides ZFS support";
}
{
assertion = cfg.mirroredBoots != [ ];
···
message = "You cannot have duplicated devices in mirroredBoots";
}
{
+
assertion = !cfg.enableTrustedBoot || cfg.version == 2;
message = "Trusted GRUB is only available for GRUB 2";
}
{
+
assertion = !cfg.efiSupport || !cfg.enableTrustedBoot;
message = "Trusted GRUB does not have EFI support";
}
{
+
assertion = !cfg.zfsSupport || !cfg.enableTrustedBoot;
message = "Trusted GRUB does not have ZFS support";
}
{
+
assertion = !cfg.enableTrustedBoot;
message = "Trusted GRUB can break your system. Remove assertion if you want to test trustedGRUB nevertheless.";
}
] ++ flip concatMap cfg.mirroredBoots (args: [
···
}
] ++ flip map args.devices (device: {
assertion = device == "nodev" || hasPrefix "/" device;
+
message = "GRUB devices must be absolute paths, not ${dev} in ${args.path}";
}));
})