Added sabnzbd :)

SABnzbd makes Usenet as simple and streamlined as possible by automating everything we can. All you have to do is add an .nzb. SABnzbd takes over from there, where it will be automatically downloaded, verified, repaired, extracted and filed away with zero human interaction.

http://sabnzbd.org/

svn path=/nixos/trunk/; revision=22446
wip/yesman
Wouter den Breejen 14 years ago
parent 41cc6ecdbb
commit 2335cb65a3
  1. 1
      modules/misc/ids.nix
  2. 1
      modules/module-list.nix
  3. 52
      modules/services/networking/sabnzbd.nix

@ -53,6 +53,7 @@ in
davfs2 = 31;
privoxy = 32;
osgi = 34;
sabnzbd = 33;
tor = 35;
# When adding a uid, make sure it doesn't match an existing gid.

@ -97,6 +97,7 @@
./services/networking/ssh/sshd.nix
./services/networking/tftpd.nix
./services/networking/vsftpd.nix
./services/networking/sabnzbd.nix
./services/networking/wicd.nix
./services/networking/wpa_supplicant.nix
./services/networking/xinetd.nix

@ -0,0 +1,52 @@
{ config, pkgs, ... }:
with pkgs.lib;
let
cfg = config.services.sabnzbd;
inherit (pkgs) sabnzbd;
in
{
###### interface
options = {
services.sabnzbd = {
enable = mkOption {
default = false;
description = "Whether to enable the sabnzbd FTP server.";
};
configFile = mkOption {
default = "/var/sabnzbd/sabnzbd.ini";
description = "Path to config file. (You need to create this file yourself!)";
};
};
};
###### implementation
config = mkIf cfg.enable {
users.extraUsers =
[ { name = "sabnzbd";
uid = config.ids.uids.sabnzbd;
description = "sabnzbd user";
home = "/homeless-shelter";
}
];
jobs.sabnzbd =
{ description = "sabnzbd server";
startOn = "network-interfaces/started";
stopOn = "network-interfaces/stop";
exec = "${sabnzbd}/bin/sabnzbd -d -f ${cfg.configFile}";
};
};
}
Loading…
Cancel
Save