modules: Revert vscode from flatpak to modules

If needed to be installed with flatpak, it can be installed from Discover
This commit is contained in:
Florian RICHER 2024-09-15 13:54:43 +02:00
parent 02b0b569ea
commit 1a0c925449
Signed by: florian.richer
GPG key ID: C73D37CBED7BFC77
4 changed files with 55 additions and 1 deletions

View file

@ -29,7 +29,6 @@ in
{ appId = "org.mozilla.Thunderbird"; origin = "flathub"; }
{ appId = "ch.protonmail.protonmail-bridge"; origin = "flathub"; }
{ appId = "org.kde.neochat"; origin = "flathub"; }
{ appId = "com.visualstudio.code"; origin = "flathub"; }
# Loisir
{ appId = "com.spotify.Client"; origin = "flathub"; }

View file

@ -4,6 +4,7 @@
imports = [
../common.nix
./apps
./editors
./desktop
./shell
];

View file

@ -0,0 +1,7 @@
{ config, pkgs, ... }:
{
imports = [
./vscode
];
}

View file

@ -0,0 +1,47 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.modules.home.editors.vscode;
in
{
options.modules.home.editors.vscode = {
enable = mkEnableOption ''
Enable vscode with my custom configurations
'';
};
config = mkIf cfg.enable {
programs.vscode = {
enable = true;
enableUpdateCheck = false;
enableExtensionUpdateCheck = false;
userSettings = {
"files.autoSave" = "onFocusChange";
"emmet.includeLanguages" = {
"phoenix-heex" = "html";
};
"git.autofetch" = true;
};
userTasks = {};
extensions = with pkgs; with vscode-extensions; [
# Nix
bbenoist.nix
# Rust
rust-lang.rust-analyzer
serayuzgur.crates
tamasfe.even-better-toml
# Phoenix
phoenixframework.phoenix
elixir-lsp.vscode-elixir-ls
# Ruby
shopify.ruby-lsp
];
};
};
}