feat(upfast): service for removing payloads.

This commit is contained in:
CronyAkatsuki 2025-11-07 16:14:42 +01:00
parent ec73382ddb
commit d1852c03e9
2 changed files with 14 additions and 5 deletions

View file

@ -1,6 +1,4 @@
#!/usr/bin/env sh instance="http://127.0.0.1:8383"
instance="$*"
files=$(curl -s "$instance"/files/) files=$(curl -s "$instance"/files/)

View file

@ -1,4 +1,15 @@
{inputs, ...}: { {
inputs,
pkgs,
lib,
...
}: let
upfast-cleaner = pkgs.writeShellApplication {
name = "upfast-cleaner";
runtimeInputs = with pkgs; [curl];
text = ./upfast-cleaner.sh;
};
in {
fileSystems."/var/lib/upfast" = { fileSystems."/var/lib/upfast" = {
device = "/root/10gb"; device = "/root/10gb";
fsType = "ext4"; fsType = "ext4";
@ -51,7 +62,7 @@
WorkingDirectory = "/var/lib/upfast"; WorkingDirectory = "/var/lib/upfast";
}; };
script = "${./upfast-cleaner.sh} 'http://localhost:8383'"; script = "${lib.getExe upfast-cleaner}; 'http://localhost:8383'";
}; };
systemd.timers.upfast-cleaner = { systemd.timers.upfast-cleaner = {