nixos/tftpd: remove with lib, format with nixmft-rfc-style (#353658)

authored by Arne Keller and committed by GitHub 222f73dd e7c6859f

+17 -25
+17 -25
nixos/modules/services/networking/tftpd.nix
··· 1 - { config, lib, pkgs, ... }: 2 - 3 - with lib; 1 + { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: 4 7 5 8 { 6 - 7 - ###### interface 8 - 9 9 options = { 10 - 11 - services.tftpd.enable = mkOption { 12 - type = types.bool; 10 + services.tftpd.enable = lib.mkOption { 11 + type = lib.types.bool; 13 12 default = false; 14 13 description = '' 15 14 Whether to enable tftpd, a Trivial File Transfer Protocol server. ··· 17 16 ''; 18 17 }; 19 18 20 - services.tftpd.path = mkOption { 21 - type = types.path; 19 + services.tftpd.path = lib.mkOption { 20 + type = lib.types.path; 22 21 default = "/srv/tftp"; 23 22 description = '' 24 23 Where the tftp server files are stored. 25 24 ''; 26 25 }; 27 - 28 26 }; 29 27 30 - 31 - ###### implementation 32 - 33 - config = mkIf config.services.tftpd.enable { 34 - 28 + config = lib.mkIf config.services.tftpd.enable { 35 29 services.xinetd.enable = true; 36 30 37 - services.xinetd.services = singleton 38 - { name = "tftp"; 39 - protocol = "udp"; 40 - server = "${pkgs.netkittftp}/sbin/in.tftpd"; 41 - serverArgs = "${config.services.tftpd.path}"; 42 - }; 43 - 31 + services.xinetd.services = lib.singleton { 32 + name = "tftp"; 33 + protocol = "udp"; 34 + server = "${pkgs.netkittftp}/sbin/in.tftpd"; 35 + serverArgs = "${config.services.tftpd.path}"; 36 + }; 44 37 }; 45 - 46 38 }