add cxx templates and improve rust template

This commit is contained in:
ulic-youthlic 2025-05-21 13:50:27 +08:00
parent bc0c2c736b
commit e8317da51b
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
22 changed files with 2634 additions and 3 deletions

34
templates/cxx/flake.nix Normal file
View file

@ -0,0 +1,34 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils = {
url = "github:numtide/flake-utils";
};
};
outputs = {
self,
flake-utils,
nixpkgs,
...
}:
flake-utils.lib.eachDefaultSystem (system: let
inherit (pkgs) lib;
pkgs = import nixpkgs {
inherit system;
};
in {
formatter = pkgs.alejandra;
devShells.default = pkgs.mkShell {
packages = with pkgs; [
clang-tools
gcc
bear
gnumake
];
};
});
nixConfig = {
keepOutputs = true;
};
}