adtya.xyz/flake.nix

44 lines
996 B
Nix
Raw Normal View History

2023-11-06 01:26:46 +05:30
{
description = "adtya.xyz";
inputs = {
2023-11-26 16:41:10 +05:30
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
2023-11-06 01:26:46 +05:30
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{ self
, nixpkgs
, flake-utils
,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs {
inherit system;
};
2024-01-04 18:10:24 +05:30
package = pkgs.callPackage ./default.nix { };
2024-06-30 17:23:07 +05:30
app = pkgs.writeShellScriptBin "app" ''
trap 'kill "''${child_pid}"; wait "''${child_pid}";' SIGINT SIGTERM
${pkgs.merecat}/bin/merecat -n -p 8080 ${package}/share/web &
child_pid="$!"
wait "''${child_pid}"
'';
2023-11-06 01:26:46 +05:30
in
{
2023-12-09 01:10:44 +05:30
formatter = pkgs.nixpkgs-fmt;
devShells.default = pkgs.mkShell {
2024-01-04 19:08:34 +05:30
packages = with pkgs; [
zs
tailwindcss-language-server
2023-11-06 01:26:46 +05:30
];
};
2024-01-04 18:10:24 +05:30
packages = {
inherit app;
default = package;
};
2023-11-06 01:26:46 +05:30
}
);
}