codium things

This commit is contained in:
Alexander Bantyev 2022-06-02 13:29:09 +04:00
parent d163200467
commit 2e8e9be81a
Signed by: balsoft
GPG Key ID: E081FF12ADCB4AD5
2 changed files with 13 additions and 5 deletions

View File

@ -1,5 +1,14 @@
{ config, pkgs, inputs, ... }: { config, pkgs, inputs, ... }:
let let
EDITOR = pkgs.writeShellScript "codium-editor" ''
NIX_OZONE_WL=1 \
exec \
${config.home-manager.users.balsoft.programs.vscode.package}/bin/codium \
--enable-features=UseOzonePlatform \
--ozone-platform=wayland \
-w -n \
"$@"
'';
codium-wayland = pkgs.buildEnv { codium-wayland = pkgs.buildEnv {
name = "codium-wayland"; name = "codium-wayland";
paths = [ paths = [
@ -9,7 +18,6 @@ let
${config.home-manager.users.balsoft.programs.vscode.package}/bin/codium \ ${config.home-manager.users.balsoft.programs.vscode.package}/bin/codium \
--enable-features=UseOzonePlatform \ --enable-features=UseOzonePlatform \
--ozone-platform=wayland \ --ozone-platform=wayland \
-w \
"$@" "$@"
'') '')
(pkgs.makeDesktopItem { (pkgs.makeDesktopItem {
@ -30,7 +38,7 @@ in {
environment.systemPackages = [ codium-wayland ]; environment.systemPackages = [ codium-wayland ];
defaultApplications.editor = { defaultApplications.editor = {
cmd = "${codium-wayland}/bin/codium-wayland"; cmd = "${EDITOR}";
desktop = "codium-wayland"; desktop = "codium-wayland";
}; };
home-manager.users.balsoft = { home-manager.users.balsoft = {
@ -70,13 +78,13 @@ in {
"update.mode" = "none"; "update.mode" = "none";
"[nix]"."editor.tabSize" = 2; "[nix]"."editor.tabSize" = 2;
"workbench.colorTheme" = "Balsoft's generated theme"; "workbench.colorTheme" = "Balsoft's generated theme";
"vim.useCtrlKeys" = false;
"terminal.integrated.profiles.linux".bash.path = "terminal.integrated.profiles.linux".bash.path =
"/run/current-system/sw/bin/bash"; "/run/current-system/sw/bin/bash";
"terminal.integrated.defaultProfile.linux" = "bash"; "terminal.integrated.defaultProfile.linux" = "bash";
"editor.fontFamily" = "IBM Plex Mono"; "editor.fontFamily" = "IBM Plex Mono";
"nix.formatterPath" = "nixfmt"; "nix.formatterPath" = "nixfmt";
"git.autofetch" = true; "git.autofetch" = true;
"redhat.telemetry.enabled" = false;
"vscode-neovim.neovimExecutablePaths.linux" = "${pkgs.neovim}/bin/nvim"; "vscode-neovim.neovimExecutablePaths.linux" = "${pkgs.neovim}/bin/nvim";
"vscode-neovim.useCtrlKeysForNormalMode" = false; "vscode-neovim.useCtrlKeysForNormalMode" = false;
"vscode-neovim.mouseSelectionStartVisualMode" = true; "vscode-neovim.mouseSelectionStartVisualMode" = true;

View File

@ -47,8 +47,8 @@
"b" = "nix build"; "b" = "nix build";
"p" = "nix-shell --run zsh -p"; "p" = "nix-shell --run zsh -p";
"s" = "nix shell"; "s" = "nix shell";
"e" = "$EDITOR -n"; "e" = "$EDITOR";
"dog" = "$EDITOR -n -"; "dog" = "$EDITOR -";
"d" = "nix develop"; "d" = "nix develop";
"r" = "nix run"; "r" = "nix run";
"f" = "nix search"; "f" = "nix search";