2023-11-12 18:07:31 +01:00
|
|
|
{
|
|
|
|
description = "CV template";
|
|
|
|
|
|
|
|
inputs = {
|
2023-11-21 11:41:31 +01:00
|
|
|
nixpkgs.url = "nixpkgs";
|
2023-11-12 18:07:31 +01:00
|
|
|
systems.url = "github:nix-systems/x86_64-linux";
|
|
|
|
flake-utils = {
|
|
|
|
url = "github:numtide/flake-utils";
|
|
|
|
inputs.systems.follows = "systems";
|
|
|
|
};
|
2023-11-21 11:41:31 +01:00
|
|
|
ide = {
|
|
|
|
url = "github:ivandimitrov8080/flake-ide";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-11-12 18:07:31 +01:00
|
|
|
};
|
|
|
|
|
2023-11-21 11:41:31 +01:00
|
|
|
outputs = { self, nixpkgs, flake-utils, systems, ide }:
|
2023-11-12 18:07:31 +01:00
|
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
|
|
let
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
pname = "cv";
|
|
|
|
version = "0.0.1";
|
|
|
|
src = ./.;
|
2023-11-21 11:41:31 +01:00
|
|
|
nvim = ide.nvim.${system}.standalone {
|
|
|
|
plugins = {
|
|
|
|
lsp.servers = {
|
|
|
|
tsserver.enable = true;
|
|
|
|
jsonls.enable = true;
|
|
|
|
tailwindcss.enable = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2023-11-12 18:07:31 +01:00
|
|
|
buildInputs = with pkgs; [
|
2023-11-21 11:41:31 +01:00
|
|
|
nvim
|
2023-11-12 18:07:31 +01:00
|
|
|
];
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
|
|
nodejs_20
|
|
|
|
bun
|
2023-11-13 12:33:50 +01:00
|
|
|
inotify-tools
|
2023-11-12 18:07:31 +01:00
|
|
|
];
|
2023-11-13 12:33:50 +01:00
|
|
|
shellHook = ''
|
|
|
|
echo "$$" > ./pid
|
|
|
|
monitor() {
|
|
|
|
while true; do
|
|
|
|
inotifywait -e modify ${pname}.tsx > /dev/null 2>&1
|
|
|
|
make
|
|
|
|
pkill -HUP mupdf
|
|
|
|
done
|
|
|
|
}
|
|
|
|
monitor > /dev/null 2>&1 &
|
|
|
|
'';
|
2023-11-12 18:07:31 +01:00
|
|
|
in
|
|
|
|
{
|
|
|
|
devShells.default = pkgs.mkShell {
|
2023-11-13 12:33:50 +01:00
|
|
|
inherit pname buildInputs nativeBuildInputs shellHook;
|
2023-11-12 18:07:31 +01:00
|
|
|
};
|
|
|
|
packages.default = pkgs.stdenv.mkDerivation {
|
|
|
|
inherit buildInputs nativeBuildInputs pname version src;
|
|
|
|
};
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
|