From efa74d02ad42ee7aeaf5c97240929063118c6252 Mon Sep 17 00:00:00 2001 From: Ryan Schanzenbacher Date: Sun, 19 Jul 2026 22:03:49 -0400 Subject: initial commit --- flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..ac29acd --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1784453100, + "narHash": "sha256-zpGZb8FYui+i8KLtC0nlcmb0voR2zB80Qn8pe7lzIbk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b471514bed69eff5255c8e63c1f80e5fe56c616f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..32d30e6 --- /dev/null +++ b/flake.nix @@ -0,0 +1,43 @@ +{ + description = "netbird-tui - terminal UI for the local NetBird daemon"; + + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + + outputs = { self, nixpkgs }: + let + systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ]; + forAllSystems = f: nixpkgs.lib.genAttrs systems (system: + f nixpkgs.legacyPackages.${system}); + in + { + packages = forAllSystems (pkgs: rec { + netbird-tui = pkgs.buildGoModule rec { + pname = "netbird-tui"; + version = "1.2"; + + src = pkgs.fetchFromGitHub { + owner = "n0pashkov"; + repo = "netbird-tui"; + rev = "v${version}"; + hash = "sha256-wMOZszRYoItBmCH+EjGvoNXnbo4GDTtaJZdokjbDNeY="; + }; + + vendorHash = "sha256-S0HY46KF+2zHUI1Zg7obvAtORf8LIncybiCyxBB5AdQ="; # ditto + + ldflags = [ "-s" "-w" ]; + + meta = with nixpkgs.lib; { + description = "Terminal UI for the local NetBird daemon"; + homepage = "https://github.com/n0pashkov/netbird-tui"; + license = licenses.mit; + mainProgram = "netbird-tui"; + }; + }; + default = netbird-tui; + }); + + overlays.default = final: prev: { + netbird-tui = self.packages.${final.stdenv.hostPlatform.system}.netbird-tui; + }; + }; +} -- cgit v1.3