Hi guys! I have a question, how do I create a system user? I am trying to install and run Clamav on my NixOS machine as a systemd unit. This is my confg so far:
environment.systemPackages = with pkgs; [
pkgs.clamav
];
and systemd:
systemd = {
services = {
clamd = {
description = "ClamAV Daemon";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.clamav}/bin/clamd --foreground=yes";
Restart = "on-failure";
User = "clamav";
Group = "clamav";
PrivateTmp = true;
RuntimeDirectory = "clamav";
RuntimeDirectoryMode = "0755";
};
};
freshclam = {
description = "ClamAV Virus Database Updater";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.clamav}/bin/freshclam --foreground=yes";
Restart = "on-failure";
User = "clamav";
Group = "clamav";
PrivateTmp = true;
RuntimeDirectory = "clamav";
RuntimeDirectoryMode = "0755";
};
};
};
};
I was following this post:
I can see that there is no user named clamav. How do I create one?