rustypaste: switch from root -> rustypaste user
This commit is contained in:
parent
f6b905013f
commit
4f910fbcc3
1 changed files with 11 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue