2023-05-21 20:52:54 -04:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
sops.secrets.rusty-auth-token = {};
|
|
|
|
environment.systemPackages = with pkgs; [rustypaste];
|
|
|
|
|
|
|
|
systemd.services.rustypaste = {
|
|
|
|
enable = true;
|
|
|
|
wantedBy = [
|
|
|
|
"multi-user.target"
|
|
|
|
];
|
|
|
|
description = "A minimal file upload/pastebin service.";
|
|
|
|
environment = {
|
2023-05-24 19:36:30 -04:00
|
|
|
# AUTH_TOKEN = config.sops.secrets.rusty-auth-token.path;
|
2023-05-21 20:52:54 -04:00
|
|
|
CONFIG = "/var/lib/rustypaste/config.toml";
|
|
|
|
};
|
|
|
|
serviceConfig = {
|
|
|
|
User = "root";
|
|
|
|
ExecStart = "${pkgs.rustypaste}/bin/rustypaste";
|
|
|
|
Restart = "always";
|
|
|
|
RestartSec = 30;
|
|
|
|
StandardOutput = "syslog";
|
|
|
|
WorkingDirectory = "/var/lib/rustypaste";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|