From 27d84c8a82ffb6d94c26c066f3d193eca5357a85 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Thu, 19 Jun 2025 01:40:34 -0700 Subject: [PATCH] add master branch toggle --- default.nix | 2 ++ src/components/navigation/sidebars/nav/RootNav.astro | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/default.nix b/default.nix index abe0fa5..b46718b 100644 --- a/default.nix +++ b/default.nix @@ -7,6 +7,7 @@ nodejs, cacert, quickshell-types ? null, + masterBranch ? false, }: stdenv.mkDerivation (final: let nodeModules = stdenv.mkDerivation { pname = "${final.pname}-node_modules"; @@ -69,6 +70,7 @@ in { ''; PRODUCTION = true; + MASTER_BRANCH = masterBranch; SECRET_MODULES_PATH = if quickshell-types == null then "" else quickshell-types; buildPhase = '' diff --git a/src/components/navigation/sidebars/nav/RootNav.astro b/src/components/navigation/sidebars/nav/RootNav.astro index 6e9f22e..334e575 100644 --- a/src/components/navigation/sidebars/nav/RootNav.astro +++ b/src/components/navigation/sidebars/nav/RootNav.astro @@ -57,8 +57,18 @@ const types = { }) ), }; + +const masterBranch = import.meta.env.MASTER_BRANCH; ---