snowflake/hosts/sakura/services/rustypaste.nix

21 lines
516 B
Nix
Raw Normal View History

2024-02-08 12:04:15 -05:00
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [ rustypaste ];
2023-05-28 22:00:50 -04:00
systemd.services.rustypaste = {
enable = true;
2024-02-08 12:04:15 -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 = {
User = "root";
ExecStart = "${pkgs.rustypaste}/bin/rustypaste";
Restart = "always";
RestartSec = 30;
WorkingDirectory = "/var/lib/rustypaste";
};
};
}