3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/modules/services/networking/tftpd.nix
Eelco Dolstra 8e6ad840f2 * Modularised the xinetd service. tftp has been factored out into a
separate module, which just declares a configuration value that
  causes the xinetd module to add it to xinetd.conf.  Also Nixified
  the service declarations to abstract over the inetd implementation.
  
* Renamed the services.xinetd.tftpd options to services.tftpd.  The
  fact that the tftpd module uses xinetd is an implementation detail.

* xinetd: use -dontfork to let Upstart monitor it, and use -syslog to
  get error messages at startup.

svn path=/nixos/trunk/; revision=16803
2009-08-21 13:05:45 +00:00

44 lines
719 B
Nix

{ config, pkgs, ... }:
with pkgs.lib;
{
###### interface
options = {
services.tftpd.enable = mkOption {
default = false;
description = ''
Whether to enable the anonymous FTP user.
'';
};
services.tftpd.path = mkOption {
default = "/home/tftp";
description = ''
Where the tftp server files are stored
'';
};
};
###### implementation
config = mkIf config.services.tftpd.enable {
services.xinetd.enable = true;
services.xinetd.services = singleton
{ name = "tftp";
protocol = "udp";
server = "${pkgs.netkittftp}/sbin/in.tftpd";
serverArgs = "${config.services.tftpd.path}";
};
};
}