forked from mirrors/nixpkgs
We don't need an explicit uid/gid. We also don't need web to depend
on deluged, since it can be started before it.
This commit is contained in:
parent
71f4330d3f
commit
bb89f2eb99
|
@ -75,7 +75,6 @@ in
|
|||
wwwrun = 54;
|
||||
spamd = 56;
|
||||
nslcd = 58;
|
||||
deluge = 60;
|
||||
|
||||
# When adding a uid, make sure it doesn't match an existing gid.
|
||||
|
||||
|
@ -133,7 +132,6 @@ in
|
|||
networkmanager = 57;
|
||||
nslcd = 58;
|
||||
scanner = 59;
|
||||
deluge = 60;
|
||||
|
||||
# When adding a gid, make sure it doesn't match an existing uid.
|
||||
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
with pkgs.lib;
|
||||
|
||||
let
|
||||
uid = config.ids.uids.deluge;
|
||||
gid = config.ids.gids.deluge;
|
||||
cfg = config.services.deluge;
|
||||
cfg_web = config.services.deluge.web;
|
||||
in {
|
||||
|
@ -43,10 +41,9 @@ in {
|
|||
};
|
||||
|
||||
systemd.services.delugeweb = mkIf cfg_web.enable {
|
||||
after = [ "network.target" "deluged.service" ];
|
||||
after = [ "network.target" ];
|
||||
description = "Deluge BitTorrent WebUI";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
wants = [ "deluged.service" ];
|
||||
path = [ pkgs.pythonPackages.deluge ];
|
||||
script = "${pkgs.pythonPackages.deluge}/bin/deluge --ui web";
|
||||
serviceConfig.User = "deluge";
|
||||
|
@ -56,13 +53,12 @@ in {
|
|||
environment.systemPackages = [ pkgs.pythonPackages.deluge ];
|
||||
|
||||
users.extraUsers.deluge = {
|
||||
inherit uid;
|
||||
group = "deluge";
|
||||
home = "/var/lib/deluge/";
|
||||
createHome = true;
|
||||
description = "Deluge Daemon user";
|
||||
};
|
||||
|
||||
users.extraGroups.deluge.gid = gid;
|
||||
users.extraGroups.deluge = {};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue