flake.nix: Add app for convenient testing with nix run
This commit is contained in:
parent
8b83eb74f1
commit
38c2999291
10
flake.nix
10
flake.nix
|
@ -27,6 +27,16 @@
|
||||||
templates = flakeOutputs.templates.packages.${system}.default;
|
templates = flakeOutputs.templates.packages.${system}.default;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
apps.${system}.default = let
|
||||||
|
inherit (self.packages.${system}) server templates;
|
||||||
|
inherit (nixpkgs.legacyPackages.${system}) writeShellScript;
|
||||||
|
in {
|
||||||
|
type = "app";
|
||||||
|
program = builtins.toString (writeShellScript "tlaternet-webserver" ''
|
||||||
|
${server}/bin/tlaternet-webserver --template-directory ${templates}
|
||||||
|
'');
|
||||||
|
};
|
||||||
|
|
||||||
devShells.${system} = {
|
devShells.${system} = {
|
||||||
templates = flakeOutputs.templates.devShells.${system}.default.overrideAttrs (old: {
|
templates = flakeOutputs.templates.devShells.${system}.default.overrideAttrs (old: {
|
||||||
buildInputs = with nixpkgs.legacyPackages.${system};
|
buildInputs = with nixpkgs.legacyPackages.${system};
|
||||||
|
|
Loading…
Reference in a new issue