react-vite-typesafe/flake.nix

73 lines
1.8 KiB
Nix
Raw Normal View History

2024-10-19 21:05:52 +02:00
{
description = "Description for the project";
inputs = {
devenv-root = {
url = "file+file:///dev/null";
flake = false;
};
flake-parts.url = "github:hercules-ci/flake-parts";
2025-03-17 12:06:50 +01:00
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
2024-10-19 21:05:52 +02:00
devenv.url = "github:cachix/devenv";
nix2container.url = "github:nlewo/nix2container";
nix2container.inputs.nixpkgs.follows = "nixpkgs";
mk-shell-bin.url = "github:rrbutani/nix-mk-shell-bin";
};
nixConfig = {
extra-trusted-public-keys = "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=";
extra-substituters = "https://devenv.cachix.org";
};
outputs = inputs @ {
flake-parts,
devenv-root,
...
}:
flake-parts.lib.mkFlake {inherit inputs;} {
imports = [
inputs.devenv.flakeModule
];
systems = ["x86_64-linux" "i686-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];
perSystem = {
2024-11-22 13:44:45 +01:00
#config,
#self',
##inputs',
2024-10-19 21:05:52 +02:00
pkgs,
2024-11-22 13:44:45 +01:00
#system,
2024-10-19 21:05:52 +02:00
...
}: let
in {
devenv.shells.default = {
devenv.root = let
devenvRootFileContent = builtins.readFile devenv-root.outPath;
in
pkgs.lib.mkIf (devenvRootFileContent != "") devenvRootFileContent;
2024-11-22 13:44:45 +01:00
name = "TODO-template-name";
2024-10-19 21:05:52 +02:00
packages = [
pkgs.biome
];
processes = {
2024-11-22 13:44:45 +01:00
#api-dev.exec = "cd packages/api && bun dev";
#web-dev.exec = "cd packages/web && bun dev";
2024-10-19 21:05:52 +02:00
};
languages.javascript = {
enable = true;
2024-11-22 13:44:45 +01:00
package = pkgs.nodejs_22;
2024-10-19 21:05:52 +02:00
2024-11-22 13:44:45 +01:00
bun.enable = true;
2024-10-19 21:05:52 +02:00
npm.enable = false;
2024-11-22 13:44:45 +01:00
pnpm.enable = false;
2024-10-19 21:05:52 +02:00
};
};
};
flake = {
};
};
}