patos/modules/patagia-agent.nix

40 lines
906 B
Nix
Raw Permalink Normal View History

2024-10-04 20:39:07 +02:00
{
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
};
};
};
}