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
This commit is contained in:
Wouter den Breejen 2010-07-03 15:10:48 +00:00
parent 41cc6ecdbb
commit 2335cb65a3
3 changed files with 54 additions and 0 deletions

View file

@ -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.

View file

@ -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

View file

@ -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}";
};
};
}