mirror of
https://github.com/tuxdotrs/trok.git
synced 2026-09-19 15:09:03 +05:30
refactor(nix): rename default.nix to package.nix
This commit is contained in:
46
flake.nix
46
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 { };
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ buildGoModule {
|
||||
|
||||
meta = {
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [tuxdotrs];
|
||||
maintainers = with lib.maintainers; [ tuxdotrs ];
|
||||
mainProgram = "trok";
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user