Author: wbreejen Date: 2010-07-03 15:10:48 +0000 (Sat, 03 Jul 2010) New Revision: 22446
You can view the changes in this commit at: https://svn.nixos.org/viewvc/nix?rev=22446&view=rev Added: nixos/trunk/modules/services/networking/sabnzbd.nix Modified: nixos/trunk/modules/misc/ids.nix nixos/trunk/modules/module-list.nix Log: 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/ Changes: Modified: nixos/trunk/modules/misc/ids.nix =================================================================== --- nixos/trunk/modules/misc/ids.nix 2010-07-03 09:18:55 UTC (rev 22445) +++ nixos/trunk/modules/misc/ids.nix 2010-07-03 15:10:48 UTC (rev 22446) @@ -53,6 +53,7 @@ davfs2 = 31; privoxy = 32; osgi = 34; + sabnzbd = 33; tor = 35; # When adding a uid, make sure it doesn't match an existing gid. Modified: nixos/trunk/modules/module-list.nix =================================================================== --- nixos/trunk/modules/module-list.nix 2010-07-03 09:18:55 UTC (rev 22445) +++ nixos/trunk/modules/module-list.nix 2010-07-03 15:10:48 UTC (rev 22446) @@ -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 Added: nixos/trunk/modules/services/networking/sabnzbd.nix =================================================================== --- nixos/trunk/modules/services/networking/sabnzbd.nix (rev 0) +++ nixos/trunk/modules/services/networking/sabnzbd.nix 2010-07-03 15:10:48 UTC (rev 22446) @@ -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}"; + }; + + }; +} _______________________________________________ nix-commits mailing list [email protected] http://mail.cs.uu.nl/mailman/listinfo/nix-commits
