A Nix flake for packaging the Dagger CLI - a platform for CI/CD and Agent Orchestration.
This flake provides the Dagger CLI tool packaged for Nix, enabling easy installation and usage across different platforms including Linux (x86_64, aarch64) and macOS (x86_64, aarch64).
Dagger is a programmable CI/CD engine that runs your pipelines in containers, providing a portable and reliable way to build, test, and deploy applications.
Run Dagger commands directly without installing:
# Check Dagger version
nix run github:basisti/dagger-flake version
# Initialize a new Dagger project
nix run github:basisti/dagger-flake init
# List available functions
nix run github:basisti/dagger-flake functions
# Call a specific function
nix run github:basisti/dagger-flake call build
Create a temporary shell environment with Dagger available:
# Enter a shell with Dagger available
nix shell github:basisti/dagger-flake
# Now you can use dagger commands directly
dagger version
dagger init
dagger functions
Add to your Home Manager configuration to install Dagger permanently:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
dagger-flake = {
url = "github:basisti/dagger-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { nixpkgs, home-manager, dagger-flake, ... }: {
homeConfigurations.yourusername = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.${system};
modules = [
{
home.packages = [
dagger-flake.packages.${system}.dagger
];
}
];
};
};
}
Then rebuild your Home Manager configuration:
home-manager switch
To install Dagger as a system package (available to all users), add to your NixOS system configuration:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
dagger-flake = {
url = "github:basisti/dagger-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { nixpkgs, dagger-flake, ... }: {
nixosConfigurations.yourhostname = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
{
environment.systemPackages = [
dagger-flake.packages.x86_64-linux.dagger
];
}
];
};
};
}
Dagger is a programmable CI/CD engine that enables you to:
-
Write CI/CD pipelines in your favorite programming language
-
Run pipelines locally or in any CI environment
-
Cache dependencies and build artifacts automatically
-
Compose and share reusable pipeline components
Learn more at https://dagger.io/