From 38189964c42ba4af4beac0e46876cde82c9a9413 Mon Sep 17 00:00:00 2001 From: Michael Fellinger Date: Thu, 21 Jul 2022 14:05:21 +0200 Subject: [PATCH] fix nomad-driver-podman --- nix/metal/bitteProfile/podman.nix | 33 ++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/nix/metal/bitteProfile/podman.nix b/nix/metal/bitteProfile/podman.nix index 593b6e3..8693b4e 100644 --- a/nix/metal/bitteProfile/podman.nix +++ b/nix/metal/bitteProfile/podman.nix @@ -5,7 +5,34 @@ pkgs, dockerAuth, ... -}: { +}: let + nomad-driver-podman = pkgs.buildGo117Module rec { + pname = "nomad-driver-podman"; + version = "0.4.0"; + + src = pkgs.fetchFromGitHub { + owner = "dermetfan"; + repo = "nomad-driver-podman"; + rev = "9207824392881669853254a185216473e2a9e194"; + sha256 = "sha256-QB5e406AA5hAkmiFqv6fjDzrqNEIb0AWCS0jFQyyGLA="; + }; + + vendorSha256 = "sha256-5PQIWSGSR5vizWEsResBLd//yWs99o/bj5DVpRMBwhA="; + + subPackages = ["."]; + + # some tests require a running podman service + doCheck = false; + + meta = with lib; { + homepage = "https://www.github.com/hashicorp/nomad-driver-podman"; + description = "Podman task driver for Nomad"; + platforms = platforms.linux; + license = licenses.mpl20; + maintainers = with maintainers; [manveru]; + }; + }; +in { # Avoid errors due to default overlay driver and zfs systemd execStart opt from showing in cli cmds. # Ref: https://github.com/NixOS/nixpkgs/issues/145261#issuecomment-964855713 virtualisation.containers.storage.settings.storage = { @@ -27,7 +54,7 @@ networking.firewall.trustedInterfaces = ["podman0"]; - systemd.services.nomad.path = [pkgs.podman]; + systemd.services.nomad.path = [nomad-driver-podman]; systemd.services.nomad.environment.REGISTRY_AUTH_FILE = dockerAuth; services.nomad.pluginDir = lib.mkForce (let @@ -35,7 +62,7 @@ name = "nomad-plugins"; paths = [ inputs.nomad-driver-nix.defaultPackage.x86_64-linux - pkgs.nomad-driver-podman + nomad-driver-podman ]; }; in "${dir}/bin");