initial commit

efa74d02ad42… · Ryan Schanzenbacher ·

Changed files

FileChanges
flake.lock +27 −0 raw
flake.nix +43 −0 raw
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;
+ };
+ };
+}