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:
16
flake.nix
16
flake.nix
@@ -2,10 +2,12 @@
|
|||||||
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,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
systems = [
|
systems = [
|
||||||
"x86_64-linux"
|
"x86_64-linux"
|
||||||
"aarch64-linux"
|
"aarch64-linux"
|
||||||
@@ -13,17 +15,19 @@
|
|||||||
"aarch64-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});
|
||||||
|
in
|
||||||
|
{
|
||||||
packages = forAllSystems (pkgs: rec {
|
packages = forAllSystems (pkgs: rec {
|
||||||
default = trok;
|
default = trok;
|
||||||
trok = pkgs.callPackage ./default.nix {};
|
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 { };
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user