From 9fc98e78cd43733210cf0cce91a65fe6c3c46f81 Mon Sep 17 00:00:00 2001 From: Jordan Holt Date: Sat, 10 Jun 2023 17:04:27 +0100 Subject: [PATCH] Add zfs to bridge oneshot --- hosts/library/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hosts/library/default.nix b/hosts/library/default.nix index 4be7b4d..7af7db7 100644 --- a/hosts/library/default.nix +++ b/hosts/library/default.nix @@ -79,13 +79,15 @@ with lib.my; after = [ "network.target" ]; wantedBy = [ "default.target" ]; - confinement.fullUnit = true; + path = [ pkgs.zfs ]; serviceConfig.Type = "oneshot"; - script = let podmancli = "${pkgs.podman}/bin/podman"; + script = let + docker = config.virtualisation.oci-containers.backend; + dockerBin = "${pkgs.${docker}}/bin/${docker}"; in '' - check=$(${podmancli} network ls | grep "library-br" || true) + check=$(${dockerBin} network ls | grep "library-br" || true) if [ -z "$check" ]; then - ${podmancli} network create library-br + ${dockerBin} network create library-br else echo "library-br already exists" fi