nixos-config/profiles/applications/vscodium/default.nix

81 lines
2.3 KiB
Nix
Raw Normal View History

2022-05-30 19:03:53 +04:00
{ config, pkgs, inputs, ... }:
let
codium-wayland = pkgs.buildEnv {
name = "codium-wayland";
paths = [
(pkgs.writeShellScriptBin "codium-wayland" ''
NIX_OZONE_WL=1 \
${config.home-manager.users.balsoft.programs.vscode.package}/bin/codium \
--enable-features=UseOzonePlatform \
--ozone-platform=wayland \
"$@"
'')
(pkgs.makeDesktopItem {
name = "codium-wayland";
desktopName = "VSCodium (Wayland)";
exec = "codium-wayland";
icon = "code";
categories = [ "Utility" "TextEditor" "Development" "IDE" ];
mimeTypes = [ "text/plain" "inode/directory" ];
extraConfig = {
StartupNotify = "true";
StartupWMClass = "vscodium";
};
})
];
};
in {
environment.systemPackages = [ codium-wayland ];
2022-05-30 14:12:15 +04:00
defaultApplications.editor = {
2022-05-30 19:03:53 +04:00
cmd = "${codium-wayland}/bin/codium-wayland";
desktop = "codium-wayland";
2022-05-30 14:12:15 +04:00
};
home-manager.users.balsoft = {
2022-05-30 19:03:53 +04:00
2022-05-30 14:12:15 +04:00
programs.vscode = {
enable = true;
package = pkgs.vscodium;
mutableExtensionsDir = false;
extensions = with pkgs.vscode-extensions; [
vscodevim.vim
kahole.magit
(inputs.direnv-vscode.packages.${pkgs.system}.vsix.overrideAttrs (_: {
buildPhase = "yarn run build";
2022-05-30 19:03:53 +04:00
installPhase = ''
mkdir -p $out/share/vscode/extensions/direnv.direnv-vscode
cp -R * $out/share/vscode/extensions/direnv.direnv-vscode
'';
2022-05-30 14:12:15 +04:00
}))
(pkgs.callPackage ./theme.nix { } config.themes.colors)
matklad.rust-analyzer
redhat.vscode-yaml
2022-05-30 19:03:53 +04:00
jnoortheen.nix-ide
2022-05-30 14:12:15 +04:00
dhall.dhall-lang
hashicorp.terraform
timonwong.shellcheck
];
userSettings = {
2022-05-30 15:39:23 +04:00
"update.mode" = "none";
2022-05-30 14:12:15 +04:00
"[nix]"."editor.tabSize" = 2;
"workbench.colorTheme" = "Balsoft's generated theme";
2022-05-30 15:25:46 +04:00
"vim.useCtrlKeys" = false;
2022-05-30 15:37:42 +04:00
"terminal.integrated.profiles.linux".bash.path =
"/run/current-system/sw/bin/bash";
"terminal.integrated.defaultProfile.linux" = "bash";
"editor.fontFamily" = "IBM Plex Mono";
2022-05-30 19:03:53 +04:00
"nix.formatterPath" = "nixfmt";
2022-05-30 14:12:15 +04:00
};
2022-05-30 15:25:46 +04:00
keybindings = [{
key = "ctrl+shift+r";
command = "workbench.action.tasks.runTask";
when = "textInputFocus";
}];
2022-05-30 14:12:15 +04:00
};
};
}