Added a web devflake (currently a copy of the CPP one), uses Go, and the traditional web stack (HTML, JS, CSS)

This commit is contained in:
Alexandre 2026-02-26 20:03:17 +01:00
parent 8f2d90bc48
commit 0c24f90379
2 changed files with 52 additions and 0 deletions

3
dev-flakes/web/.envrc Normal file
View File

@ -0,0 +1,3 @@
FLAKEDIR=~/Developer/nix/NixOSDots/dev-flakes
use flake ${FLAKEDIR}/web

49
dev-flakes/web/flake.nix Normal file
View File

@ -0,0 +1,49 @@
{
description = "General C++ dev enviroment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
in
{
packages.default = pkgs.stdenv.mkDerivation {
pname = "myapp";
version = "0.1.0";
src = self;
nativeBuildInputs = with pkgs; [ cmake ninja ];
buildInputs = with pkgs; [ ];
};
devShells.default = pkgs.mkShell {
name = "cpp-dev";
# In the dev shell, you get more tools than just what's needed to build
packages = with pkgs; [
gcc
clang
cmake
ninja
gdb
valgrind
clang-tools
ccache
];
shellHook = ''
echo "C++ loaded"
export CC="ccache gcc"
export CXX="ccache g++"
'';
};
});
}