Skip to content

Commit

Permalink
add usage example to readme
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Sagi-Kazar <[email protected]>
  • Loading branch information
sagikazarmark committed Oct 27, 2023
1 parent a59f6e1 commit 1dc6577
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,28 @@

<!-- Remove this if you don't use github actions -->
![Build and populate cache](https://github.com/dagger/nix/workflows/Build%20and%20populate%20cache/badge.svg)

## Usage

### As flake

```nix
{
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
dagger.url = "github:dagger/nix";
dagger.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, flake-utils, dagger, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in {
devShell = pkgs.mkShell {
buildInputs = [ dagger.packages.dagger ];
};
});
}
```

0 comments on commit 1dc6577

Please sign in to comment.