Skip to content

rake5k/podman-shell-flake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Podman Nix Development Shell Flake

NixOS Build and Test Update

This flake should enable you to inject podman as a development environment dependency.

Usage

For providing the podman-shell in a Nix development shell, this flake needs to be added to the inputs and its overlay registered in the pkgs overlay. Afterwards it can just be added to the buildInputs - but don't forget to integrate its shellHook as well.

Example

# flake.nix

{
  description = "Podman shell flake demo";

  inputs.podman-shell.url = "github:rake5k/podman-shell-flake";

  outputs = { self, nixpkgs, podman-shell }:
    let
      system = "x86_64-linux";
      pkgs = import nixpkgs {
        inherit system;
        overlays = [
          podman-shell.overlay
        ];
      };
    in
    {
      devShell = pkgs.mkShell {
        name = "my-dev-shell";

        buildInputs = with pkgs; [
          podman-shell
          podman-shell.dockerCompat # optional - for use as a `docker` drop-in replacement
        ];

        inherit (pkgs.podman-shell) shellHook;
      };
    };
}

References

Highly inspired by adisbladis' podman-shell.nix.