-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
55 lines (47 loc) · 1.18 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
46
47
48
49
50
51
52
53
54
55
{
description = "My personal NixOS utils library";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
nixpkgs,
flake-utils,
...
}: let
overlays = import ./overlays;
forEachSystem = flake-utils.lib.eachSystem (with flake-utils.lib.system; [
aarch64-darwin
x86_64-darwin
x86_64-linux
]);
systemsFlakes = forEachSystem (system: let
pkgs = import nixpkgs {
inherit system;
overlays = [overlays];
};
packages = builtins.listToAttrs (builtins.map (pkg: {
name = pkg;
value = pkgs.${pkg};
}) (builtins.attrNames (overlays pkgs pkgs)));
in rec {
inherit packages;
checks = {
overlays-check = pkgs.symlinkJoin {
name = "overlays";
paths = builtins.attrValues packages;
};
};
lib = import ./lib {inherit pkgs;};
devShells.default = lib.mkShell {
name = "utility";
bubblewrap = true;
};
});
in
systemsFlakes
// {
lib = systemsFlakes.lib // {inherit forEachSystem;};
overlays.default = overlays;
};
}