feat: init netbird dashboard
This commit is contained in:
parent
624808fcca
commit
a2fc99bd6c
|
@ -5,6 +5,7 @@
|
|||
zsh-histdb = super.callPackage ./zsh-histdb.nix {};
|
||||
your_spotify = super.callPackage ./your_spotify.nix {};
|
||||
deploy = super.callPackage ./deploy.nix {};
|
||||
netbird-dashboard = super.callPackage ./netbird-dashboard {};
|
||||
minify = super.callPackage ./minify {};
|
||||
mongodb-bin = super.callPackage ./mongodb-bin.nix {};
|
||||
awakened-poe-trade = super.callPackage ./awakened-poe-trade.nix {};
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
diff --git a/src/layouts/AppLayout.tsx b/src/layouts/AppLayout.tsx
|
||||
index 86137fe..0339fb7 100644
|
||||
--- a/src/layouts/AppLayout.tsx
|
||||
+++ b/src/layouts/AppLayout.tsx
|
||||
@@ -6,7 +6,7 @@ import { cn } from "@utils/helpers";
|
||||
import dayjs from "dayjs";
|
||||
import relativeTime from "dayjs/plugin/relativeTime";
|
||||
import { Viewport } from "next/dist/lib/metadata/types/extra-types";
|
||||
-import { Inter } from "next/font/google";
|
||||
+import localFont from "next/font/local";
|
||||
import React from "react";
|
||||
import { Toaster } from "react-hot-toast";
|
||||
import OIDCProvider from "@/auth/OIDCProvider";
|
||||
@@ -17,7 +17,7 @@ import ErrorBoundaryProvider from "@/contexts/ErrorBoundary";
|
||||
import { GlobalThemeProvider } from "@/contexts/GlobalThemeProvider";
|
||||
import { NavigationEvents } from "@/contexts/NavigationEvents";
|
||||
|
||||
-const inter = Inter({ subsets: ["latin"] });
|
||||
+const inter = localFont({ src: "./inter.ttf" });
|
||||
|
||||
// Extend dayjs with relativeTime plugin
|
||||
dayjs.extend(relativeTime);
|
40
pkgs/netbird-dashboard/default.nix
Normal file
40
pkgs/netbird-dashboard/default.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
lib,
|
||||
buildNpmPackage,
|
||||
fetchFromGitHub,
|
||||
inter,
|
||||
}:
|
||||
buildNpmPackage rec {
|
||||
pname = "netbird-dashboard";
|
||||
version = "2.1.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "netbirdio";
|
||||
repo = "dashboard";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-RxqGNIo7UdcVKz7UmupjsCzDpaSoz9UawiUc+h2tyTU=";
|
||||
};
|
||||
patches = [
|
||||
./0001-remove-buildtime-google-fonts.patch
|
||||
];
|
||||
|
||||
CYPRESS_INSTALL_BINARY = 0;
|
||||
npmDepsHash = "sha256-ts3UuThIMf+wwSr3DpZ+k1i9RnHi/ltvhD/7lomVxQk=";
|
||||
npmFlags = ["--legacy-peer-deps"];
|
||||
|
||||
preBuild = ''
|
||||
cp ${inter}/share/fonts/truetype/InterVariable.ttf src/layouts/inter.ttf
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -R out/* $out
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "NetBird Management Service Web UI Panel";
|
||||
homepage = "https://github.com/netbirdio/dashboard";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [thubrecht];
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue