feat(upfast): service for removing payloads.
This commit is contained in:
parent
ec73382ddb
commit
d1852c03e9
2 changed files with 14 additions and 5 deletions
|
|
@ -1,6 +1,4 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
instance="$*"
|
||||
instance="http://127.0.0.1:8383"
|
||||
|
||||
files=$(curl -s "$instance"/files/)
|
||||
|
||||
|
|
|
|||
|
|
@ -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" = {
|
||||
device = "/root/10gb";
|
||||
fsType = "ext4";
|
||||
|
|
@ -51,7 +62,7 @@
|
|||
WorkingDirectory = "/var/lib/upfast";
|
||||
};
|
||||
|
||||
script = "${./upfast-cleaner.sh} 'http://localhost:8383'";
|
||||
script = "${lib.getExe upfast-cleaner}; 'http://localhost:8383'";
|
||||
};
|
||||
|
||||
systemd.timers.upfast-cleaner = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue