chore: nixfmt *
This commit is contained in:
parent
dc761a5271
commit
d039179898
161 changed files with 2688 additions and 3024 deletions
|
@ -3,47 +3,47 @@
|
|||
|
||||
let
|
||||
cniConfigDir = let
|
||||
loopback = pkgs.writeText "00-loopback.conf" ''
|
||||
{
|
||||
"cniVersion": "0.3.0",
|
||||
"type": "loopback"
|
||||
}
|
||||
'';
|
||||
|
||||
podman-bridge = pkgs.writeText "87-podman-bridge.conflist" ''
|
||||
{
|
||||
"cniVersion": "0.3.0",
|
||||
"name": "podman",
|
||||
"plugins": [
|
||||
{
|
||||
"type": "bridge",
|
||||
"bridge": "cni0",
|
||||
"isGateway": true,
|
||||
"ipMasq": true,
|
||||
"ipam": {
|
||||
"type": "host-local",
|
||||
"subnet": "10.88.0.0/16",
|
||||
"routes": [
|
||||
{ "dst": "0.0.0.0/0" }
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "portmap",
|
||||
"capabilities": {
|
||||
"portMappings": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
'';
|
||||
in pkgs.runCommand "cniConfig" {} ''
|
||||
set -x
|
||||
mkdir $out;
|
||||
ln -s ${loopback} $out/${loopback.name}
|
||||
ln -s ${podman-bridge} $out/${podman-bridge.name}
|
||||
loopback = pkgs.writeText "00-loopback.conf" ''
|
||||
{
|
||||
"cniVersion": "0.3.0",
|
||||
"type": "loopback"
|
||||
}
|
||||
'';
|
||||
|
||||
podman-bridge = pkgs.writeText "87-podman-bridge.conflist" ''
|
||||
{
|
||||
"cniVersion": "0.3.0",
|
||||
"name": "podman",
|
||||
"plugins": [
|
||||
{
|
||||
"type": "bridge",
|
||||
"bridge": "cni0",
|
||||
"isGateway": true,
|
||||
"ipMasq": true,
|
||||
"ipam": {
|
||||
"type": "host-local",
|
||||
"subnet": "10.88.0.0/16",
|
||||
"routes": [
|
||||
{ "dst": "0.0.0.0/0" }
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "portmap",
|
||||
"capabilities": {
|
||||
"portMappings": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
'';
|
||||
in pkgs.runCommand "cniConfig" { } ''
|
||||
set -x
|
||||
mkdir $out;
|
||||
ln -s ${loopback} $out/${loopback.name}
|
||||
ln -s ${podman-bridge} $out/${podman-bridge.name}
|
||||
'';
|
||||
|
||||
podmanConfig = pkgs.writeText "libpod.conf" ''
|
||||
# libpod.conf is the default configuration file for all tools using libpod to
|
||||
# manage containers
|
||||
|
@ -126,13 +126,7 @@ let
|
|||
}
|
||||
'';
|
||||
|
||||
in
|
||||
|
||||
{ image
|
||||
, pull ? "always"
|
||||
, global_args ? ""
|
||||
, run_args ? ""
|
||||
, userns ? "keep-id"
|
||||
in { image, pull ? "always", global_args ? "", run_args ? "", userns ? "keep-id"
|
||||
}:
|
||||
|
||||
(pkgs.writeScriptBin "posh" ''
|
||||
|
@ -170,12 +164,7 @@ in
|
|||
--conmon ${pkgs.conmon}/bin/conmon --runtime ${pkgs.crun}/bin/crun \
|
||||
--rm -i --network host --pull=''${POSH_PULL} \
|
||||
$tty $ssh -e HOME -v $HOME:$HOME -w $HOME \
|
||||
${if userns != null then "--userns="+userns else ""} \
|
||||
${if userns != null then "--userns=" + userns else ""} \
|
||||
${run_args} \
|
||||
''${POSH_IMAGE} /usr/bin/env bash -l "''${cmd[@]}"
|
||||
'')
|
||||
.overrideAttrs(attrs: attrs // {
|
||||
passthru = {
|
||||
shellPath = "/bin/posh";
|
||||
};
|
||||
})
|
||||
'').overrideAttrs (attrs: attrs // { passthru = { shellPath = "/bin/posh"; }; })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue