1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-10 23:00:39 +02:00

feat(netbird): add server module by tom hubrecht

This commit is contained in:
oddlama 2024-03-19 16:11:55 +01:00
parent f37c491f8e
commit d497263313
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
4 changed files with 708 additions and 3 deletions

View file

@ -21,11 +21,12 @@
passthru.enableSecretProvisioning = true;
doCheck = false;
});
kanidm-provision = prev.callPackage ./kanidm-provision.nix {};
segoe-ui-ttf = prev.callPackage ./segoe-ui-ttf.nix {};
zsh-histdb-skim = prev.callPackage ./zsh-skim-histdb.nix {};
awakened-poe-trade = prev.callPackage ./awakened-poe-trade.nix {};
html-to-svg = prev.callPackage ./html-to-svg {};
kanidm-provision = prev.callPackage ./kanidm-provision.nix {};
netbird-dashboard = prev.callPackage ./netbird-dashboard {};
segoe-ui-ttf = prev.callPackage ./segoe-ui-ttf.nix {};
zsh-histdb-skim = prev.callPackage ./zsh-skim-histdb.nix {};
neovim-clean = prev.neovim-unwrapped.overrideAttrs (old: {
nativeBuildInputs = (old.nativeBuildInputs or []) ++ [prev.makeWrapper];
postInstall =

View file

@ -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);

View 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; # Stops Cypress from trying to download binaries
npmDepsHash = "sha256-ts3UuThIMf+wwSr3DpZ+k1i9RnHi/ltvhD/7lomVxQk=";
npmFlags = ["--legacy-peer-deps"];
preBuild = ''
cp ${inter}/share/fonts/truetype/InterVariable.ttf src/layouts/inter.ttf
'';
installPhase = ''
cp -R build $out
'';
meta = with lib; {
description = "NetBird Management Service Web UI Panel";
homepage = "https://github.com/netbirdio/dashboard";
license = licenses.bsd3;
maintainers = with maintainers; [thubrecht];
};
}