refactor(nix): rename default.nix to package.nix

This commit is contained in:
tux
2026-09-07 21:15:50 +05:30
parent c1ba1e55d0
commit ad3792139d
2 changed files with 26 additions and 22 deletions

View File

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

View File

@@ -11,7 +11,7 @@ buildGoModule {
meta = { meta = {
license = lib.licenses.mit; license = lib.licenses.mit;
maintainers = with lib.maintainers; [tuxdotrs]; maintainers = with lib.maintainers; [ tuxdotrs ];
mainProgram = "trok"; mainProgram = "trok";
}; };
} }