From 46b2253a6d82424baeea441c0f459add3f95d35c Mon Sep 17 00:00:00 2001 From: Patrick Date: Fri, 17 Jan 2025 22:44:57 +0100 Subject: [PATCH] feat: firezone backend --- hosts/nucnix/hostapd.nix | 2 + pkgs/default.nix | 2 +- pkgs/firezone.nix | 92 ++ pkgs/mix.nix | 1722 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 1817 insertions(+), 1 deletion(-) create mode 100644 pkgs/firezone.nix create mode 100644 pkgs/mix.nix diff --git a/hosts/nucnix/hostapd.nix b/hosts/nucnix/hostapd.nix index 31b98f2..4882196 100644 --- a/hosts/nucnix/hostapd.nix +++ b/hosts/nucnix/hostapd.nix @@ -26,6 +26,8 @@ systemd.services.hostapd.restartIfChanged = false; systemd.services.hostapd.reloadTriggers = lib.mkForce [ ]; + boot.extraModprobeConfig = "options iwlwifi fw_restart=false"; + # networking.nftables.firewall.zones.wlan.interfaces = [ "wlan1" ]; # networking.nftables.firewall.zones.home.interfaces = [ "br-home" ]; # networking.nftables.firewall.rules.wifi-forward = { diff --git a/pkgs/default.nix b/pkgs/default.nix index d864cad..5500e06 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -3,8 +3,8 @@ _inputs: [ (_final: prev: { zsh-histdb-skim = prev.callPackage ./zsh-histdb-skim.nix { }; zsh-histdb = prev.callPackage ./zsh-histdb.nix { }; - pr-tracker = prev.callPackage ./pr-tracker.nix { }; signal-to-blog = prev.callPackage ./signal-to-blog.nix { }; + firezone = prev.callPackage ./firezone.nix { }; minion = prev.callPackage ./minion.nix { }; mongodb-bin = prev.callPackage ./mongodb-bin.nix { }; disneyplus = prev.callPackage ./disney.nix { }; diff --git a/pkgs/firezone.nix b/pkgs/firezone.nix new file mode 100644 index 0000000..fca6502 --- /dev/null +++ b/pkgs/firezone.nix @@ -0,0 +1,92 @@ +{ + lib, + fetchFromGitHub, + beamPackages, + pnpm_9, + nodejs, + tailwindcss, + esbuild, +}: + +beamPackages.mixRelease rec { + pname = "firezone"; + version = "1.4.0"; + + src = "${ + fetchFromGitHub { + owner = "firezone"; + repo = "firezone"; + tag = "headless-client-${version}"; + hash = "sha256-juDqENBUAZ43AsRkNkFqh5+6Pj6dQeUbVvsU8Y50NJQ="; + } + }/elixir"; + + pnpmDeps = pnpm_9.fetchDeps { + inherit pname version; + src = "${src}/apps/web/assets"; + hash = "sha256-6rhhGv3jQY5MkOMNe1GEtNyrzJYXCSzvo8RLlKelP10="; + }; + pnpmRoot = "./apps/web/assets"; + + preBuild = '' + cat >> config/config.exs <