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, ...}: {
|
{pkgs, ...}: {
|
||||||
environment.systemPackages = with pkgs; [rustypaste];
|
environment.systemPackages = with pkgs; [rustypaste];
|
||||||
|
|
||||||
|
users = {
|
||||||
|
users.rustypaste = {
|
||||||
|
isSystemUser = true;
|
||||||
|
group = "rustypaste";
|
||||||
|
};
|
||||||
|
groups.rustypaste = {
|
||||||
|
name = "rustypaste";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
systemd.services.rustypaste = {
|
systemd.services.rustypaste = {
|
||||||
enable = true;
|
enable = true;
|
||||||
wantedBy = ["multi-user.target"];
|
wantedBy = ["multi-user.target"];
|
||||||
|
@ -9,7 +19,7 @@
|
||||||
CONFIG = "/var/lib/rustypaste/config.toml";
|
CONFIG = "/var/lib/rustypaste/config.toml";
|
||||||
};
|
};
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
User = "root";
|
User = "rustypaste";
|
||||||
ExecStart = "${pkgs.rustypaste}/bin/rustypaste";
|
ExecStart = "${pkgs.rustypaste}/bin/rustypaste";
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
RestartSec = 30;
|
RestartSec = 30;
|
||||||
|
|
Loading…
Reference in a new issue