nixos/modules/common/programming/vscode.nix

30 lines
777 B
Nix

{ config, pkgs, lib, ... }:
{
options = {
vscode = {
enable = lib.mkEnableOption {
description = "Enable Visual Studio Code";
default = false;
};
};
};
config = lib.mkIf (config.gui.enable && config.vscode.enable) {
home-manager.users.${config.user} = {
nixpkgs.config.allowUnfree = true;
programs.vscode = {
enable = true;
extensions = with pkgs.vscode-extensions; [
bbenoist.nix
];
userSettings = {
"workbench.colorTheme" = "Catppuccin Mocha";
"editor.tabSize" = 2;
"editor.insertSpaces" = true;
"git.autofetch" = true;
# "git.enableSmartCommit" = true;
"git.confirmSync" = false;
};
};
};
};
}