uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
65
nixos/modules/services/networking/atftpd.nix
Normal file
65
nixos/modules/services/networking/atftpd.nix
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
# NixOS module for atftpd TFTP server
|
||||
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.services.atftpd;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
options = {
|
||||
|
||||
services.atftpd = {
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Whether to enable the atftpd TFTP server. By default, the server
|
||||
binds to address 0.0.0.0.
|
||||
'';
|
||||
};
|
||||
|
||||
extraOptions = mkOption {
|
||||
default = [];
|
||||
type = types.listOf types.str;
|
||||
example = literalExpression ''
|
||||
[ "--bind-address 192.168.9.1"
|
||||
"--verbose=7"
|
||||
]
|
||||
'';
|
||||
description = ''
|
||||
Extra command line arguments to pass to atftp.
|
||||
'';
|
||||
};
|
||||
|
||||
root = mkOption {
|
||||
default = "/srv/tftp";
|
||||
type = types.path;
|
||||
description = ''
|
||||
Document root directory for the atftpd.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
systemd.services.atftpd = {
|
||||
description = "TFTP Server";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
# runs as nobody
|
||||
serviceConfig.ExecStart = "${pkgs.atftp}/sbin/atftpd --daemon --no-fork ${lib.concatStringsSep " " cfg.extraOptions} ${cfg.root}";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue