nixos/sysupdate: allow lists in sysupdate config
Lists are convenient to have in sysupdate configuration when using multiple `MatchPattern` under `Target` when the target can have multiple filenames. This use-case is helpful for BootLoaderSpec bootcounting where the target file on disk can have multiple filenames, and in order for sysupdate to properly ensure only N number of instances of this target exist at one time, we need to have multiple match patterns.
This commit is contained in:
parent
b37344b7a0
commit
50866dc20f
|
@ -3,7 +3,7 @@
|
||||||
let
|
let
|
||||||
cfg = config.systemd.sysupdate;
|
cfg = config.systemd.sysupdate;
|
||||||
|
|
||||||
format = pkgs.formats.ini { };
|
format = pkgs.formats.ini { listToValue = toString; };
|
||||||
|
|
||||||
definitionsDirectory = utils.systemdUtils.lib.definitions
|
definitionsDirectory = utils.systemdUtils.lib.definitions
|
||||||
"sysupdate.d"
|
"sysupdate.d"
|
||||||
|
@ -79,7 +79,7 @@ in
|
||||||
Source = {
|
Source = {
|
||||||
Type = "url-file";
|
Type = "url-file";
|
||||||
Path = "https://download.example.com/";
|
Path = "https://download.example.com/";
|
||||||
MatchPattern = "nixos_@v.efi.xz";
|
MatchPattern = [ "nixos_@v+@l-@d.efi" "nixos_@v+@l.efi" "nixos_@v.efi" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
Target = {
|
Target = {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user