-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
58 lines (49 loc) · 1.38 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
56
57
58
{
description = "collection of uku's modules and packages";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs =
{
self,
nixpkgs,
}:
let
inherit (nixpkgs) lib;
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
pkgsFor = system: import nixpkgs { inherit system; };
forEachSystem = lib.genAttrs systems;
in
{
packages = forEachSystem (
system:
let
pkgs = pkgsFor system;
isAvailable = name: drv: lib.meta.availableOn { inherit system; } drv;
flakePkgs = self.overlays.default { } pkgs;
in
lib.filterAttrs isAvailable flakePkgs
);
overlays.default = import ./pkgs/all-packages.nix;
nixosModules = {
reposilite = import ./modules/reposilite.nix;
asus-numpad = import ./modules/asus-numpad.nix self;
};
formatter = forEachSystem (system: (pkgsFor system).nixfmt-rfc-style);
hydraJobs =
let
ciSystem = "x86_64-linux";
isBuildable =
name: drv:
(!drv ? meta.hydraPlatforms)
|| lib.any (lib.meta.platformMatch { system = ciSystem; }) drv.meta.hydraPlatforms;
packages = self.packages.${ciSystem};
in
lib.filterAttrs isBuildable packages;
};
}