2022-05-30 19:03:53 +04:00
|
|
|
{ config, pkgs, inputs, ... }:
|
|
|
|
let
|
2022-06-02 13:29:09 +04:00
|
|
|
EDITOR = pkgs.writeShellScript "codium-editor" ''
|
2022-06-14 01:40:20 +04:00
|
|
|
source "/etc/profiles/per-user/balsoft/etc/profile.d/hm-session-vars.sh"
|
2022-06-02 13:29:09 +04:00
|
|
|
NIX_OZONE_WL=1 \
|
|
|
|
exec \
|
|
|
|
${config.home-manager.users.balsoft.programs.vscode.package}/bin/codium \
|
|
|
|
--enable-features=UseOzonePlatform \
|
|
|
|
--ozone-platform=wayland \
|
|
|
|
-w -n \
|
|
|
|
"$@"
|
|
|
|
'';
|
2022-05-30 19:03:53 +04:00
|
|
|
codium-wayland = pkgs.buildEnv {
|
|
|
|
name = "codium-wayland";
|
|
|
|
paths = [
|
|
|
|
(pkgs.writeShellScriptBin "codium-wayland" ''
|
|
|
|
NIX_OZONE_WL=1 \
|
2022-06-02 00:20:48 +04:00
|
|
|
exec \
|
2022-05-30 19:03:53 +04:00
|
|
|
${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";
|
|
|
|
};
|
|
|
|
})
|
|
|
|
];
|
|
|
|
};
|
2022-06-02 20:21:47 +04:00
|
|
|
|
|
|
|
custom-extensions = import ./extensions.nix {
|
|
|
|
inherit (pkgs.vscode-utils) buildVscodeMarketplaceExtension;
|
|
|
|
};
|
2022-05-30 19:03:53 +04:00
|
|
|
in {
|
|
|
|
environment.systemPackages = [ codium-wayland ];
|
|
|
|
|
2022-05-30 14:12:15 +04:00
|
|
|
defaultApplications.editor = {
|
2022-06-02 13:29:09 +04:00
|
|
|
cmd = "${EDITOR}";
|
2022-05-30 19:03:53 +04:00
|
|
|
desktop = "codium-wayland";
|
2022-05-30 14:12:15 +04:00
|
|
|
};
|
|
|
|
home-manager.users.balsoft = {
|
|
|
|
programs.vscode = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.vscodium;
|
|
|
|
|
2023-01-06 15:19:00 +04:00
|
|
|
mutableExtensionsDir = true;
|
2022-11-14 10:44:09 +04:00
|
|
|
extensions =
|
|
|
|
with inputs.nix-vscode-marketplace.packages.${pkgs.system}.vscode;
|
|
|
|
with inputs.nix-vscode-marketplace.packages.${pkgs.system}.open-vsx;
|
|
|
|
with pkgs.vscode-extensions;
|
2022-06-02 20:21:47 +04:00
|
|
|
[
|
|
|
|
kahole.magit
|
2023-01-06 11:12:48 +04:00
|
|
|
|
|
|
|
cab404.vscode-direnv
|
2022-05-30 14:12:15 +04:00
|
|
|
|
2022-06-02 20:21:47 +04:00
|
|
|
(pkgs.callPackage ./theme.nix { } config.themes.colors)
|
2022-05-30 14:12:15 +04:00
|
|
|
|
2022-08-03 20:09:39 +04:00
|
|
|
vscodevim.vim
|
|
|
|
|
2022-06-02 20:21:47 +04:00
|
|
|
matklad.rust-analyzer
|
|
|
|
redhat.vscode-yaml
|
|
|
|
jnoortheen.nix-ide
|
|
|
|
dhall.dhall-lang
|
|
|
|
hashicorp.terraform
|
|
|
|
timonwong.shellcheck
|
|
|
|
bungcip.better-toml
|
|
|
|
haskell.haskell
|
|
|
|
justusadam.language-haskell
|
|
|
|
ms-python.python
|
|
|
|
github.vscode-pull-request-github
|
2022-06-08 14:34:17 +04:00
|
|
|
eamodio.gitlens
|
|
|
|
llvm-vs-code-extensions.vscode-clangd
|
2022-06-16 15:29:33 +04:00
|
|
|
stkb.rewrap
|
2022-09-09 09:23:12 +04:00
|
|
|
shardulm94.trailing-spaces
|
2022-11-14 10:44:09 +04:00
|
|
|
meraymond.idris-vscode
|
2022-11-25 10:15:07 +04:00
|
|
|
ocamllabs.ocaml-platform
|
2022-12-29 19:19:02 +04:00
|
|
|
bierner.markdown-mermaid
|
2022-06-02 20:21:47 +04:00
|
|
|
] ++ pkgs.lib.concatMap builtins.attrValues
|
|
|
|
(builtins.attrValues custom-extensions);
|
2022-05-30 14:12:15 +04:00
|
|
|
|
|
|
|
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: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-06-01 21:19:11 +04:00
|
|
|
"git.autofetch" = true;
|
2022-06-02 13:29:09 +04:00
|
|
|
"redhat.telemetry.enabled" = false;
|
2022-06-02 20:21:47 +04:00
|
|
|
"security.workspace.trust.untrustedFiles" = "open";
|
2022-06-14 01:24:53 +04:00
|
|
|
"window.menuBarVisibility" = "toggle";
|
2022-08-17 22:57:31 +04:00
|
|
|
"vim.useSystemClipboard" = true;
|
2023-01-18 22:35:03 +04:00
|
|
|
"haskell.manageHLS" = "PATH";
|
|
|
|
"extensions.autoCheckUpdates" = false;
|
|
|
|
"extensions.autoUpdate" = false;
|
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
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|