dream2nix/examples/dream2nix-repo-flake/flake.nix
DavHau 556f2e7114 feat(lib): add helper lib.importPackages
This makes the repo initialization simpler (see examples)
2023-09-06 00:43:37 +02:00

27 lines
639 B
Nix

{
description = "My flake with dream2nix packages";
inputs = {
dream2nix.url = "github:nix-community/dream2nix";
nixpkgs.url = "nixpkgs/nixos-unstable";
};
outputs = inputs @ {
self,
dream2nix,
nixpkgs,
...
}: let
system = "x86_64-linux";
in {
# all packages defined inside ./packages/
packages.${system} = dream2nix.lib.importPackages {
projectRoot = ./.;
# can be changed to ".git" or "flake.nix" to get rid of .project-root
projectRootFile = ".project-root";
packagesDir = "/packages";
packageSets.nixpkgs = nixpkgs.legacyPackages.${system};
};
};
}