feat: setup flake

This commit is contained in:
tux
2025-02-27 17:01:50 +05:30
parent d52159d98d
commit e64319616f
5 changed files with 85 additions and 0 deletions

27
flake.nix Normal file
View File

@ -0,0 +1,27 @@
{
description = "Simple tunneler in Go that exposes local ports to the internet";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
outputs = {
self,
nixpkgs,
}: let
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forAllSystems = function: nixpkgs.lib.genAttrs systems (system: function nixpkgs.legacyPackages.${system});
in {
packages = forAllSystems (pkgs: rec {
default = trok;
trok = pkgs.callPackage ./default.nix {};
});
devShells = forAllSystems (pkgs: {
default = pkgs.callPackage ./shell.nix {};
});
};
}