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
52
nixos/modules/services/networking/rxe.nix
Normal file
52
nixos/modules/services/networking/rxe.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.networking.rxe;
|
||||
|
||||
in {
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
networking.rxe = {
|
||||
enable = mkEnableOption "RDMA over converged ethernet";
|
||||
interfaces = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
example = [ "eth0" ];
|
||||
description = ''
|
||||
Enable RDMA on the listed interfaces. The corresponding virtual
|
||||
RDMA interfaces will be named rxe_<interface>.
|
||||
UDP port 4791 must be open on the respective ethernet interfaces.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
systemd.services.rxe = {
|
||||
description = "RoCE interfaces";
|
||||
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "systemd-modules-load.service" "network-online.target" ];
|
||||
wants = [ "network-pre.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
ExecStart = map ( x:
|
||||
"${pkgs.iproute2}/bin/rdma link add rxe_${x} type rxe netdev ${x}"
|
||||
) cfg.interfaces;
|
||||
|
||||
ExecStop = map ( x:
|
||||
"${pkgs.iproute2}/bin/rdma link delete rxe_${x}"
|
||||
) cfg.interfaces;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue