-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
50 lines (43 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
{
description = "Build and deploy serverless functions with Nix";
inputs = {
nixpkgs.url = "nixpkgs/nixos-23.11-small";
utils.url = "github:numtide/flake-utils";
flake-compat.url = "github:edolstra/flake-compat";
flake-compat.flake = false;
};
nixConfig = {
extra-substituters = [ "https://welteki.cachix.org" ];
extra-trusted-public-keys = [ "welteki.cachix.org-1:zb0txiNEbjq9Fx7svp4LhTgFIQHKSa5ESi7QlLFjjQY=" ];
};
outputs = { self, nixpkgs, utils, ... }@inputs: {
overlays.default = final: prev: {
of-watchdog = import ./pkgs/of-watchdog.nix final;
classic-watchdog = import ./pkgs/classic-watchdog.nix final;
ofTools = import ./pkgs/build-support/openfaas final;
hello-fn = import ./examples/hello-fn.nix final;
};
} // utils.lib.eachSystem [ "x86_64-linux" ] (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ self.overlays.default ];
};
in
{
packages = {
inherit (pkgs) of-watchdog classic-watchdog hello-fn;
classic-watchdog-image = pkgs.ofTools.baseImages.classic-watchdog;
of-watchdog-image = pkgs.ofTools.baseImages.of-watchdog;
};
devShells.default = pkgs.mkShell {
buildInputs = [
pkgs.cachix
pkgs.statix
pkgs.vulnix
pkgs.deadnix
pkgs.nil
];
};
});
}