From 6285f5e30f95ea2a87eed75009b5dd69a560d2ad Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Mon, 31 Jul 2023 16:15:24 +0300 Subject: [PATCH] add vscode --- modules/dev/cc.nix | 5 +++++ modules/dev/editors/default.nix | 1 + modules/dev/editors/nvim/default.nix | 5 ----- modules/dev/editors/vscode/default.nix | 16 ++++++++++++++++ 4 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 modules/dev/editors/vscode/default.nix diff --git a/modules/dev/cc.nix b/modules/dev/cc.nix index 9798d5a2..fefd5b87 100644 --- a/modules/dev/cc.nix +++ b/modules/dev/cc.nix @@ -16,6 +16,11 @@ in clang gdb pkg-config + # lsp + clang-tools + cmake-language-server + # lint + cpplint ]; }; } diff --git a/modules/dev/editors/default.nix b/modules/dev/editors/default.nix index 36045662..7da21253 100644 --- a/modules/dev/editors/default.nix +++ b/modules/dev/editors/default.nix @@ -1,5 +1,6 @@ { imports = [ ./nvim + ./vscode ]; } diff --git a/modules/dev/editors/nvim/default.nix b/modules/dev/editors/nvim/default.nix index 88b62289..ddd8b284 100644 --- a/modules/dev/editors/nvim/default.nix +++ b/modules/dev/editors/nvim/default.nix @@ -12,11 +12,6 @@ in # because yes users.users.sako.packages = with pkgs; [ neovim - # lsp - clang-tools - cmake-language-server - # lint - cpplint ]; home-manager.users.sako.xdg.configFile.nvim = { source = ../../../../config/nvim; diff --git a/modules/dev/editors/vscode/default.nix b/modules/dev/editors/vscode/default.nix new file mode 100644 index 00000000..2401d2d2 --- /dev/null +++ b/modules/dev/editors/vscode/default.nix @@ -0,0 +1,16 @@ +{ outputs, options, config, lib, pkgs, ...}: +with lib; +let + cfg = config.modules.dev.editors.vscode; +in +{ + options.modules.dev.editors.vscode = { + enable = mkEnableOption false; + }; + + config = mkIf cfg.enable { + users.users.sako.packages = with pkgs; [ + vscode.fhs + ]; + }; +}