Initial Template

This commit is contained in:
Mona Mayrhofer 2024-10-19 21:05:52 +02:00
commit 35342d6c2d
No known key found for this signature in database
GPG key ID: 5C83114FA383C6A0
23 changed files with 4945 additions and 0 deletions

83
flake.nix Normal file
View file

@ -0,0 +1,83 @@
{
description = "Description for the project";
inputs = {
devenv-root = {
url = "file+file:///dev/null";
flake = false;
};
flake-parts.url = "github:hercules-ci/flake-parts";
nixpkgs.url = "github:cachix/devenv-nixpkgs/rolling";
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 = {
config,
self',
inputs',
pkgs,
system,
...
}: let
in {
devenv.shells.default = {
devenv.root = let
devenvRootFileContent = builtins.readFile devenv-root.outPath;
in
pkgs.lib.mkIf (devenvRootFileContent != "") devenvRootFileContent;
name = "tdkdb";
services.postgres = {
enable = true;
package = pkgs.postgresql_16;
createDatabase = false;
listen_addresses = "127.0.0.1";
port = 5432;
initialScript = ''
'';
initialDatabases = [
];
};
packages = [
pkgs.biome
];
processes = {
#api-dev.exec = "cd packages/api && pnpm run dev";
web-dev.exec = "cd packages/web && pnpm run dev";
};
languages.javascript = {
enable = true;
package = pkgs.nodejs_21;
npm.enable = false;
pnpm.enable = true;
};
};
};
flake = {
};
};
}