Commit ff776981 authored by nikstur's avatar nikstur
Browse files

nixos/version: support UAPI Version Format in IMAGE_VERSION field

Add '~' and '^' to the supported characters for the field. These
characters are needed to be able to define all versions that are
compatible with the UAPI Version Format specification.

One example where this is used is the `%A` flag in systemd.unit. If we
don't allow these other characters, we for example cannot declare a
pre-relase version.

systemd, as far as I can tell, doesn't enforce any restrictions on the
os-release fields.

https://uapi-group.org/specifications/specs/version_format_specification/
parent bafcff9b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -135,7 +135,7 @@ in
      };

      version = lib.mkOption {
        type = types.nullOr (types.strMatching "^[a-z0-9._-]+$");
        type = types.nullOr (types.strMatching "^[a-z0-9._-~^]+$");
        default = null;
        description = ''
          Image version.