-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathflake.nix
50 lines (42 loc) · 1.34 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 = "Relay grafana alerts to home-assistant notifications";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
};
outputs = { self, nixpkgs, flake-utils, ... }:
{
nixosModules = { ha-relay = import ./module.nix; };
} //
flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system};
in rec {
packages = flake-utils.lib.flattenTree rec {
ha-relay = pkgs.buildGoModule rec {
pname = "ha-relay";
version = "1.0.0";
src = self;
vendorHash = null;
meta = with pkgs.lib; {
maintainers = with maintainers; [ pinpox ];
license = licenses.gpl3;
description = "Grafana Alerts to home-assistant notifications";
homepage =
"https://github.com/pinpox/home-assistant-grafana-relay";
};
};
};
apps = {
ha-relay = flake-utils.lib.mkApp {
drv = packages.ha-relay;
exePath = "/bin/home-assistant-grafana-relay";
};
};
defaultPackage = packages.ha-relay;
defaultApp = apps.ha-relay;
});
}