2020-12-10 20:58:21 +11:00
|
|
|
{
|
2021-11-13 18:51:16 +11:00
|
|
|
description = "xeals's Nix repository";
|
2020-12-10 20:58:21 +11:00
|
|
|
|
2021-11-13 18:51:16 +11:00
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
2020-12-10 20:58:21 +11:00
|
|
|
|
2021-11-13 18:51:16 +11:00
|
|
|
outputs = { self, nixpkgs }:
|
2020-12-10 20:58:21 +11:00
|
|
|
let
|
2021-11-13 18:51:16 +11:00
|
|
|
|
|
|
|
inherit (nixpkgs) lib;
|
|
|
|
|
|
|
|
supportedSystems = [
|
|
|
|
"aarch64-darwin"
|
|
|
|
"aarch64-linux"
|
|
|
|
"i686-linux"
|
|
|
|
"x86_64-darwin"
|
|
|
|
"x86_64-linux"
|
|
|
|
];
|
|
|
|
|
|
|
|
forAllSystems = f: lib.genAttrs supportedSystems (system: f system);
|
|
|
|
|
2020-12-10 20:58:21 +11:00
|
|
|
in
|
|
|
|
{
|
2021-11-13 18:51:16 +11:00
|
|
|
|
|
|
|
nixosModules = lib.mapAttrs (_: path: import path) (import ./modules);
|
2021-01-04 12:02:59 +11:00
|
|
|
|
2021-11-13 19:05:18 +11:00
|
|
|
nixosModule = {
|
|
|
|
imports = lib.attrValues self.nixosModules;
|
|
|
|
};
|
|
|
|
|
2020-12-10 20:58:21 +11:00
|
|
|
overlays = import ./overlays // {
|
2022-10-26 10:51:44 +11:00
|
|
|
pkgs = _final: prev: import ./pkgs/top-level/all-packages.nix { pkgs = prev; };
|
2020-12-10 20:58:21 +11:00
|
|
|
};
|
2021-01-04 12:02:59 +11:00
|
|
|
|
2022-10-26 10:51:44 +11:00
|
|
|
overlay = _final: _prev: {
|
2021-01-04 12:02:59 +11:00
|
|
|
xeals = nixpkgs.lib.composeExtensions self.overlays.pkgs;
|
|
|
|
};
|
2021-11-13 18:51:16 +11:00
|
|
|
|
|
|
|
packages = forAllSystems (system:
|
|
|
|
let
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
xPkgs = import ./pkgs/top-level/all-packages.nix { inherit pkgs; };
|
|
|
|
in
|
|
|
|
lib.filterAttrs
|
2022-10-26 10:51:44 +11:00
|
|
|
(_attr: drv: builtins.elem system (drv.meta.platforms or [ ]))
|
2021-11-13 18:51:16 +11:00
|
|
|
xPkgs);
|
|
|
|
|
|
|
|
apps = forAllSystems (system:
|
|
|
|
let
|
|
|
|
mkApp = opts: { type = "app"; } // opts;
|
|
|
|
pkgs = self.packages.${system};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
alacritty = mkApp { program = "${pkgs.alacritty-ligatures}/bin/alacritty"; };
|
|
|
|
protonmail-bridge = mkApp { program = "${pkgs.protonmail-bridge}/bin/protonmail-bridge"; };
|
|
|
|
protonmail-bridge-headless = mkApp { program = "${pkgs.protonmail-bridge}/bin/protonmail-bridge"; };
|
|
|
|
psst-cli = mkApp { program = "${pkgs.psst}/bin/psst-cli"; };
|
|
|
|
psst-gui = mkApp { program = "${pkgs.psst}/bin/psst-gui"; };
|
|
|
|
samrewritten = mkApp { program = "${pkgs.samrewritten}/bin/samrewritten"; };
|
|
|
|
spotify-ripper = mkApp { program = "${pkgs.spotify-ripper}/bin/spotify-ripper"; };
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
2020-12-10 20:58:21 +11:00
|
|
|
}
|