40 lines
906 B
Nix
40 lines
906 B
Nix
|
{
|
||
|
pkgs,
|
||
|
utils,
|
||
|
...
|
||
|
}:
|
||
|
|
||
|
{
|
||
|
|
||
|
system.activationScripts.patagia-agent = ''
|
||
|
mkdir -p /var/lib/extensions
|
||
|
mkdir -p /etc/systemd/extensions
|
||
|
'';
|
||
|
|
||
|
environment.etc."sysupdate.patagia-agent.d".source =
|
||
|
let
|
||
|
format = pkgs.formats.ini { listToValue = toString; };
|
||
|
in
|
||
|
utils.systemdUtils.lib.definitions "sysupdate.patagia-agent.d" format {
|
||
|
"10-image.conf" = {
|
||
|
Source = {
|
||
|
MatchPattern = "patagia-agent_@v.raw";
|
||
|
Path = "https://images.dl.patagia.dev/patagia-agent/";
|
||
|
Type = "url-file";
|
||
|
};
|
||
|
|
||
|
Target = {
|
||
|
InstancesMax = 2;
|
||
|
Path = "/var/lib/extensions";
|
||
|
CurrentSymlink = "/etc/systemd/extensions/patagia-agent.raw";
|
||
|
Type = "regular-file";
|
||
|
MatchPattern = "patagia-agent_@v.raw";
|
||
|
};
|
||
|
|
||
|
Transfer = {
|
||
|
Verify = "no"; # FIXME: verify
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|