Loading nixos/lib/systemd-lib.nix +5 −0 Original line number Diff line number Diff line Loading @@ -525,4 +525,9 @@ in rec { )} ''; # The maximum number of characters allowed in a GPT partition label. This # limit is specified by UEFI and enforced by systemd-repart. # Corresponds to GPT_LABEL_MAX from systemd's gpt.h. GPTMaxLabelLength = 36; } nixos/modules/system/boot/systemd/repart.nix +3 −3 Original line number Diff line number Diff line Loading @@ -13,14 +13,14 @@ let partitionAssertions = lib.mapAttrsToList (fileName: definition: let maxLabelLength = 36; # GPT_LABEL_MAX defined in systemd's gpt.h inherit (utils.systemdUtils.lib) GPTMaxLabelLength; labelLength = builtins.stringLength definition.Label; in { assertion = definition ? Label -> maxLabelLength >= labelLength; assertion = definition ? Label -> GPTMaxLabelLength >= labelLength; message = '' The partition label '${definition.Label}' defined for '${fileName}' is ${toString labelLength} characters long, but the maximum label length supported by systemd is ${toString maxLabelLength}. characters long, but the maximum label length supported by systemd is ${toString GPTMaxLabelLength}. ''; } ) cfg.partitions; Loading Loading
nixos/lib/systemd-lib.nix +5 −0 Original line number Diff line number Diff line Loading @@ -525,4 +525,9 @@ in rec { )} ''; # The maximum number of characters allowed in a GPT partition label. This # limit is specified by UEFI and enforced by systemd-repart. # Corresponds to GPT_LABEL_MAX from systemd's gpt.h. GPTMaxLabelLength = 36; }
nixos/modules/system/boot/systemd/repart.nix +3 −3 Original line number Diff line number Diff line Loading @@ -13,14 +13,14 @@ let partitionAssertions = lib.mapAttrsToList (fileName: definition: let maxLabelLength = 36; # GPT_LABEL_MAX defined in systemd's gpt.h inherit (utils.systemdUtils.lib) GPTMaxLabelLength; labelLength = builtins.stringLength definition.Label; in { assertion = definition ? Label -> maxLabelLength >= labelLength; assertion = definition ? Label -> GPTMaxLabelLength >= labelLength; message = '' The partition label '${definition.Label}' defined for '${fileName}' is ${toString labelLength} characters long, but the maximum label length supported by systemd is ${toString maxLabelLength}. characters long, but the maximum label length supported by systemd is ${toString GPTMaxLabelLength}. ''; } ) cfg.partitions; Loading