Added C++ language

This commit is contained in:
Jan-Bulthuis 2024-12-02 00:52:31 +01:00
parent e24066e577
commit a91fb54e24
1 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,54 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.rust;
in
{
options.modules.cpp = {
enable = mkEnableOption "cpp";
};
config = mkIf cfg.enable {
# Allow unfree
modules.unfree.allowedPackages = [
"vscode-extension-ms-vscode-cpptools"
# TODO: Remove, it should not be here
"android-studio-stable"
"android-sdk-cmdline-tools"
"android-sdk-tools"
];
# Gitignore additions
modules.git.ignores = [
".ccls-cache"
];
# Development packages
home.packages = with pkgs; [
gnumake
];
# VSCode configuration
programs.vscode = {
extensions = with pkgs.vscode-extensions; [
ms-vscode.cpptools
ms-vscode.cmake-tools
];
userSettings = {
# "C_Cpp.clang_format_fallbackStyle" = "{ BasedOnStyle: Google, IndentWidth: 4 }";
};
};
# Neovim configuration
programs.nixvim = {
plugins.lsp.servers.ccls.enable = true;
};
};
}