Skip to content

Commit

Permalink
fix nomad-driver-podman
Browse files Browse the repository at this point in the history
  • Loading branch information
manveru committed Jul 21, 2022
1 parent b174bd3 commit 3818996
Showing 1 changed file with 30 additions and 3 deletions.
33 changes: 30 additions & 3 deletions nix/metal/bitteProfile/podman.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -27,15 +54,15 @@

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
dir = pkgs.symlinkJoin {
name = "nomad-plugins";
paths = [
inputs.nomad-driver-nix.defaultPackage.x86_64-linux
pkgs.nomad-driver-podman
nomad-driver-podman
];
};
in "${dir}/bin");
Expand Down

0 comments on commit 3818996

Please sign in to comment.