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";
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 { };
});
};
}

View File

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