2023-06-11 02:08:06 -04:00
|
|
|
{pkgs, ...}: {
|
2023-05-28 22:00:50 -04:00
|
|
|
environment.systemPackages = with pkgs; [rustypaste];
|
|
|
|
|
2024-05-31 12:52:56 -04:00
|
|
|
users = {
|
|
|
|
users.rustypaste = {
|
|
|
|
isSystemUser = true;
|
|
|
|
group = "rustypaste";
|
|
|
|
};
|
|
|
|
groups.rustypaste = {
|
|
|
|
name = "rustypaste";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-05-28 22:00:50 -04:00
|
|
|
systemd.services.rustypaste = {
|
|
|
|
enable = true;
|
2024-02-01 15:48:47 -05:00
|
|
|
wantedBy = ["multi-user.target"];
|
2023-05-28 22:00:50 -04:00
|
|
|
description = "A minimal file upload/pastebin service.";
|
|
|
|
environment = {
|
|
|
|
CONFIG = "/var/lib/rustypaste/config.toml";
|
|
|
|
};
|
|
|
|
serviceConfig = {
|
2024-05-31 12:52:56 -04:00
|
|
|
User = "rustypaste";
|
2023-05-28 22:00:50 -04:00
|
|
|
ExecStart = "${pkgs.rustypaste}/bin/rustypaste";
|
|
|
|
Restart = "always";
|
|
|
|
RestartSec = 30;
|
|
|
|
WorkingDirectory = "/var/lib/rustypaste";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|