diff options
author | nikstur <nikstur@outlook.com> | 2023-12-30 00:15:17 +0100 |
---|---|---|
committer | nikstur <nikstur@outlook.com> | 2024-01-19 14:43:29 +0100 |
commit | a34af9a9556e205fe0a72014a335b96037b41823 (patch) | |
tree | 2bdfc4463a29684b6887b670a8a2dae2678f4037 /nixos/modules/misc/version.nix | |
parent | 1e70382b81def87bd4d273a6ef504eae754450f2 (diff) |
image/repart: add version and compression options
The version option is needed if you want to implement partition & systemd-boot based A/B booting where the version information is encoded in the files on the ESP. See systemd-sysupate docs for more details on this: https://www.freedesktop.org/software/systemd/man/latest/sysupdate.d.html Note, however, that this is not *only* useful for systemd-sysupdate but also for other similar updating tools/mechanisms.
Diffstat (limited to 'nixos/modules/misc/version.nix')
-rw-r--r-- | nixos/modules/misc/version.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/misc/version.nix b/nixos/modules/misc/version.nix index 4b33a2e3151ac..c929c3b37285b 100644 --- a/nixos/modules/misc/version.nix +++ b/nixos/modules/misc/version.nix @@ -115,7 +115,7 @@ in image = { id = lib.mkOption { - type = lib.types.nullOr lib.types.str; + type = types.nullOr (types.strMatching "^[a-z0-9._-]+$"); default = null; description = lib.mdDoc '' Image identifier. @@ -129,7 +129,7 @@ in }; version = lib.mkOption { - type = lib.types.nullOr lib.types.str; + type = types.nullOr (types.strMatching "^[a-z0-9._-]+$"); default = null; description = lib.mdDoc '' Image version. |