feat(cooling): Package OpenLinkHub and add module

Change-Id: I2273a14c6242df77aef4378f1ed1a455b3815a4e
Reviewed-on: https://git.clicks.codes/c/Chimera/NixFiles/+/827
Tested-by: Samuel Shuert <coded@clicks.codes>
Reviewed-by: Skyler Grey <minion@clicks.codes>
diff --git a/packages/OpenLinkHub/default.nix b/packages/OpenLinkHub/default.nix
new file mode 100644
index 0000000..f9119f2
--- /dev/null
+++ b/packages/OpenLinkHub/default.nix
@@ -0,0 +1,33 @@
+{ lib
+, buildGoModule
+, fetchFromGitHub
+, pkg-config
+, systemd
+}:
+let
+  version = "0.2.1";
+  OpenLinkHub = fetchFromGitHub {
+    owner = "jurkovic-nikola";
+    repo = "OpenLinkHub";
+    rev = version;
+    hash = "sha256-2naNOGRPKy8H9I4e6X+uX3muT20M9YX2BGrPmY7RVAo=";
+  };
+in
+buildGoModule {
+  pname = "OpenLinkHub";
+  inherit version;
+
+  src = OpenLinkHub;
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ systemd.dev ];
+
+  postInstall = ''
+    mkdir -p $out/var/lib/OpenLinkHub
+    cp -r ${OpenLinkHub}/{static,web} $out/var/lib/OpenLinkHub
+    cp ${OpenLinkHub}/config.json $out/var/lib/OpenLinkHub
+    cp ${OpenLinkHub}/database/rgb.json $out/var/lib/OpenLinkHub
+  '';
+
+  vendorHash = "sha256-Sv2gGnI3mJvOl866idKC1q+6jh4ysEot0eLLBKPb0T0=";
+}