Add zfs to bridge oneshot

This commit is contained in:
2023-06-10 17:04:27 +01:00
parent 58e00950ce
commit 9fc98e78cd

View File

@ -79,13 +79,15 @@ with lib.my;
after = [ "network.target" ]; after = [ "network.target" ];
wantedBy = [ "default.target" ]; wantedBy = [ "default.target" ];
confinement.fullUnit = true; path = [ pkgs.zfs ];
serviceConfig.Type = "oneshot"; serviceConfig.Type = "oneshot";
script = let podmancli = "${pkgs.podman}/bin/podman"; script = let
docker = config.virtualisation.oci-containers.backend;
dockerBin = "${pkgs.${docker}}/bin/${docker}";
in '' in ''
check=$(${podmancli} network ls | grep "library-br" || true) check=$(${dockerBin} network ls | grep "library-br" || true)
if [ -z "$check" ]; then if [ -z "$check" ]; then
${podmancli} network create library-br ${dockerBin} network create library-br
else else
echo "library-br already exists" echo "library-br already exists"
fi fi