nur-packages/flake.nix

48 lines
1.7 KiB
Nix
Raw Normal View History

2020-12-10 20:58:21 +11:00
{
description = "xeals's flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
let
2021-01-04 12:02:59 +11:00
inherit (flake-utils.lib) eachDefaultSystem flattenTree;
inherit (nixpkgs.lib.attrsets) filterAttrs mapAttrs;
2020-12-10 20:58:21 +11:00
in
{
nixosModules = mapAttrs (_: path: import path) (import ./modules);
2021-01-04 12:02:59 +11:00
2020-12-10 20:58:21 +11:00
overlays = import ./overlays // {
pkgs = final: prev: import ./pkgs/top-level/all-packages.nix { pkgs = prev; };
};
2021-01-04 12:02:59 +11:00
overlay = final: prev: {
xeals = nixpkgs.lib.composeExtensions self.overlays.pkgs;
};
} // eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
xPkgs = import ./pkgs/top-level/all-packages.nix { inherit pkgs; };
mkApp = opts: { type = "app"; } // opts;
in
rec {
packages = filterAttrs
(attr: drv: builtins.elem system (drv.meta.platforms or [ ]))
(flattenTree xPkgs);
apps = flattenTree {
alacritty = mkApp { program = "${packages.alacritty-ligatures}/bin/alacritty"; };
protonmail-bridge = mkApp { program = "${packages.protonmail-bridge}/bin/protonmail-bridge"; };
protonmail-bridge-headless = mkApp { program = "${packages.protonmail-bridge}/bin/protonmail-bridge"; };
psst = {
cli = mkApp { program = "${packages.psst}/bin/psst-cli"; };
gui = mkApp { program = "${packages.psst}/bin/psst-gui"; };
};
2021-01-04 12:10:40 +11:00
samrewritten = mkApp { program = "${packages.samrewritten}/bin/samrewritten"; };
2021-01-04 12:02:59 +11:00
spotify-ripper = mkApp { program = "${packages.spotify-ripper}/bin/spotify-ripper"; };
};
});
2020-12-10 20:58:21 +11:00
}