rustypaste: switch from root -> rustypaste user

This commit is contained in:
notohh 2024-05-31 12:52:56 -04:00
parent f6b905013f
commit 4f910fbcc3
Signed by: notohh
GPG key ID: BD47506D475EE86D

View file

@ -1,6 +1,16 @@
{pkgs, ...}: {
environment.systemPackages = with pkgs; [rustypaste];
users = {
users.rustypaste = {
isSystemUser = true;
group = "rustypaste";
};
groups.rustypaste = {
name = "rustypaste";
};
};
systemd.services.rustypaste = {
enable = true;
wantedBy = ["multi-user.target"];
@ -9,7 +19,7 @@
CONFIG = "/var/lib/rustypaste/config.toml";
};
serviceConfig = {
User = "root";
User = "rustypaste";
ExecStart = "${pkgs.rustypaste}/bin/rustypaste";
Restart = "always";
RestartSec = 30;