dream2nix/examples/dream2nix-repo-flake/flake.nix

31 lines
753 B
Nix
Raw Normal View History

2023-09-03 11:24:46 +03:00
{
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";
pkgs = nixpkgs.legacyPackages.${system};
lib = nixpkgs.lib;
packageModuleNames = builtins.attrNames (builtins.readDir ./packages);
in {
# all packages defined inside ./packages/
packages.${system} =
lib.genAttrs packageModuleNames
(moduleName:
dream2nix.lib.evalModules {
2023-09-03 11:29:49 +03:00
modules = ["${./packages}/${moduleName}" ./settings.nix];
2023-09-03 11:24:46 +03:00
packageSets.nixpkgs = pkgs;
specialArgs.self = self;
});
};
}