-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
69 lines (60 loc) · 2.06 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
59
60
61
62
63
64
65
66
67
68
69
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11";
nixng.url = "github:nix-community/NixNG/8255f9e12d8d39e82c6047835e21577f1b8284c3";
nixng.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, nixng } @ inputs:
let
inherit (nixpkgs) lib;
supportedSystems = [ "x86_64-linux" "aarch64-linux" ];
repositoryPrefix = "docker.io/st8ed/";
registry = "docker.io";
namespace = "com.st8ed.";
forAllSystems = lib.genAttrs supportedSystems;
nixpkgsFor = lib.genAttrs supportedSystems (system: import nixpkgs {
inherit system;
overlays = [ self.overlay ];
});
in
{
inherit repositoryPrefix;
packages = forAllSystems (system: with nixpkgsFor."${system}";
dockerImages // flatpakImages
// { inherit helmCharts kustomizePackages; }
// { inherit dockerTools chartTools; }
// { ci = callPackage ./ci.nix { }; }
// { inherit pkgs; }
);
overlay = lib.composeManyExtensions [
(import ./lib/dockerTools.nix)
(import ./lib/flatpakTools.nix)
(import ./lib/chartTools.nix)
(import ./lib/kustomizeTools.nix)
(pkgs: super: {
dockerTools = super.dockerTools.overrideScope' (self: super: {
options = super.options.overrideScope' (_: _: {
inherit repositoryPrefix registry;
});
});
flatpakTools = super.flatpakTools.overrideScope' (self: super: {
options = super.options.overrideScope' (_: _: {
inherit namespace;
});
});
makeNgSystem = name: config: nixng.nglib.makeSystem {
system = pkgs.system;
nixpkgs = with pkgs; {
inherit lib;
legacyPackages."${system}" = pkgs;
};
inherit name config;
};
})
(import ./pkgs/dockerImages.nix)
(import ./pkgs/flatpakImages.nix)
(import ./pkgs/helmCharts.nix)
(import ./pkgs/kustomizePackages.nix)
];
};
}