Installing the cni plugins.

This commit is contained in:
Tom Alexander
2025-12-18 00:27:18 -05:00
parent 988a1673b3
commit 8a440d144d
4 changed files with 60 additions and 12 deletions

View File

@@ -0,0 +1,15 @@
{
"cniVersion": "1.0.0",
"name": "bridge",
"type": "bridge",
"bridge": "cni0",
"isGateway": true,
"ipMasq": true,
"ipam": {
"type": "host-local",
"ranges": [
[{"subnet": "SUBNET"}]
],
"routes": [{"dst": "0.0.0.0/0"}]
}
}

View File

@@ -0,0 +1,5 @@
{
"cniVersion": "1.1.0",
"name": "lo",
"type": "loopback"
}

View File

@@ -0,0 +1,27 @@
# unpackPhase
# patchPhase
# configurePhase
# buildPhase
# checkPhase
# installPhase
# fixupPhase
# installCheckPhase
# distPhase
{
stdenv,
openssl,
...
}:
stdenv.mkDerivation (finalAttrs: {
name = "cni-conf";
nativeBuildInputs = [ openssl ];
buildInputs = [ ];
unpackPhase = "true";
installPhase = ''
mkdir -p "$out"
cd "$out"
install ${./files/10-bridge.conf} ${./files/99-loopback.conf} $out/
'';
})