-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
45 lines (39 loc) · 1.42 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
description = "A small overlay with some packages I use";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixConfig = {
extra-substituters = "https://internetunexplorer.cachix.org";
extra-trusted-public-keys =
"internetunexplorer.cachix.org-1:F6CYMkx5/TJmDQQ+DTsFzRy58Ad+doYEW5CdVDZJVdY=";
};
outputs = { self, nixpkgs }:
let
allSystems = nixpkgs.lib.systems.flakeExposed;
forAllSystems = nixpkgs.lib.genAttrs allSystems;
in {
packages = forAllSystems (system:
let
pkgs = import nixpkgs {
inherit system;
config.allowBroken = true;
config.allowUnfree = true;
};
allPackages =
import ./all-packages.nix { inherit (pkgs) lib callPackage; };
isSupported = _: package:
nixpkgs.lib.elem system package.meta.platforms;
in nixpkgs.lib.filterAttrs isSupported allPackages);
apps = forAllSystems (system:
let
isApp = _: nixpkgs.lib.hasAttrByPath [ "passthru" "exePath" ];
mkApp = _: package: {
type = "app";
program = "${package}${package.passthru.exePath}";
};
in nixpkgs.lib.mapAttrs mkApp
(nixpkgs.lib.filterAttrs isApp self.packages.${system}));
overlays.default = import ./default.nix;
formatter =
forAllSystems (system: nixpkgs.legacyPackages.${system}.nixfmt);
};
}