Add base conf for v2

This commit is contained in:
sven
2025-04-18 09:47:15 +02:00
parent de0e3c597f
commit cd6342bd1b
3 changed files with 49 additions and 0 deletions

2
.envrc Normal file
View File

@@ -0,0 +1,2 @@
export DIRENV_WARN_TIMEOUT=1m
use flake . --impure

19
Taskfile.yml Normal file
View File

@@ -0,0 +1,19 @@
# https://taskfile.dev
version: '3'
vars:
GREETING: Hello, World!
tasks:
default:
cmds:
- echo "Documentation Tool Kit"
- task -l
silent: true
nix:update:
desc: "Updating flake and its packages"
cmds:
- echo "Updating flake"
- nix flake update

28
flake.nix Normal file
View File

@@ -0,0 +1,28 @@
{
description = "A Nix-flake-based Node.js development environment";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
outputs = { self, nixpkgs }:
let
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs { inherit system; };
});
in
{
devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell {
packages = with pkgs; [
nodejs_22
(yarn.override { nodejs = nodejs_22; })
vale
];
shellHook = ''
echo "Node: `${pkgs.nodejs}/bin/node --version`"
echo "Vale: `vale -v | awk '{print $3}'`"
'';
};
});
};
}