diff options
author | nikstur <nikstur@outlook.com> | 2024-04-08 16:36:28 +0200 |
---|---|---|
committer | nikstur <nikstur@outlook.com> | 2024-04-08 16:42:25 +0200 |
commit | 4c397ea6de1d93dc90e8ff7757eaf3b47428b851 (patch) | |
tree | 491ddf8319cfb90b417d8ea0c124d4a471299d06 /nixos/modules/system | |
parent | f819df36af7518fbc732533012c9436bc244c589 (diff) |
systemd-lib: include GPTMaxLabelLength constant
Diffstat (limited to 'nixos/modules/system')
-rw-r--r-- | nixos/modules/system/boot/systemd/repart.nix | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nixos/modules/system/boot/systemd/repart.nix b/nixos/modules/system/boot/systemd/repart.nix index 6cc387cb6f43f..7771f5fe06789 100644 --- a/nixos/modules/system/boot/systemd/repart.nix +++ b/nixos/modules/system/boot/systemd/repart.nix @@ -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; |