diff --git a/flake.nix b/flake.nix index f6234ad..c3159f7 100644 --- a/flake.nix +++ b/flake.nix @@ -2,28 +2,32 @@ 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" - ]; + 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 {}; - }); + forAllSystems = + function: nixpkgs.lib.genAttrs systems (system: function nixpkgs.legacyPackages.${system}); + in + { + packages = forAllSystems (pkgs: rec { + default = trok; + trok = pkgs.callPackage ./package.nix { }; + }); - nixosModules.default = ./module.nix; + nixosModules.default = ./module.nix; - devShells = forAllSystems (pkgs: { - default = pkgs.callPackage ./shell.nix {}; - }); - }; + devShells = forAllSystems (pkgs: { + default = pkgs.callPackage ./shell.nix { }; + }); + }; } diff --git a/default.nix b/package.nix similarity index 81% rename from default.nix rename to package.nix index 4387027..cae9be6 100644 --- a/default.nix +++ b/package.nix @@ -11,7 +11,7 @@ buildGoModule { meta = { license = lib.licenses.mit; - maintainers = with lib.maintainers; [tuxdotrs]; + maintainers = with lib.maintainers; [ tuxdotrs ]; mainProgram = "trok"; }; }