packages: build with dream2nix flake-parts module

This commit is contained in:
Max Headroom 2023-01-11 02:23:06 +01:00
parent 3bb85b39cd
commit c34009f099

View file

@ -1,4 +1,4 @@
{ inputs, self, ... }: { lib, inputs, self, ... }:
{ {
imports = [ imports = [
@ -12,39 +12,43 @@
./websites/landing/project.nix ./websites/landing/project.nix
./websites/stop-using-nix-env/project.nix ./websites/stop-using-nix-env/project.nix
]; ];
perSystem = { filters, pkgs, self', ... }: dream2nix.config = {
projectRoot = ./.;
overridesDirs = [ ./dream2nix-overrides ];
};
perSystem = { config, filters, pkgs, self', ... }:
let let
inherit (self'.packages) nix-super; inherit (self'.packages) nix-super;
pins = import ./sources; pins = import ./sources;
dream2nix = inputs.dream2nix.lib2.init {
inherit pkgs;
config = {
projectRoot = ./.;
overridesDirs = [ ./dream2nix-overrides ];
};
};
in in
{ {
dream2nix = {
inputs = filters.doFilter filters.packages {
uptime-kuma = {
source = pins.uptime-kuma;
projects.uptime-kuma = {
subsystem = "nodejs";
translator = "package-lock";
};
};
excalidraw = {
source = pins.excalidraw;
projects.excalidraw = {
subsystem = "nodejs";
translator = "yarn-lock";
};
};
};
};
packages = filters.doFilter filters.packages rec { packages = filters.doFilter filters.packages rec {
cinny = pkgs.callPackage ./web-apps/cinny { inherit pins; }; cinny = pkgs.callPackage ./web-apps/cinny { inherit pins; };
excalidraw = let excalidraw = let
dream = dream2nix.dream2nix-interface.makeOutputs { inherit (config.dream2nix.outputs.excalidraw.packages) excalidraw;
source = pins.excalidraw; in excalidraw // { webroot = "${excalidraw}/${excalidraw.webPath}"; };
};
inherit (dream.packages) excalidraw;
in
excalidraw // { webroot = "${excalidraw}/${excalidraw.webPath}"; };
uptime-kuma = let
dream = dream2nix.dream2nix-interface.makeOutputs {
source = pins.uptime-kuma;
};
inherit (dream.packages) uptime-kuma;
in
uptime-kuma;
grafana = pkgs.callPackage ./monitoring/grafana { }; grafana = pkgs.callPackage ./monitoring/grafana { };
@ -69,6 +73,8 @@
searxng = pkgs.callPackage ./web-apps/searxng { inherit pins; }; searxng = pkgs.callPackage ./web-apps/searxng { inherit pins; };
stevenblack-hosts = pkgs.callPackage ./data/stevenblack { inherit pins; }; stevenblack-hosts = pkgs.callPackage ./data/stevenblack { inherit pins; };
inherit (config.dream2nix.outputs.uptime-kuma.packages) uptime-kuma;
}; };
projectShells = { projectShells = {