defualt helix settings to facilitate learning keybindings

This commit is contained in:
Cyryl Płotnicki 2023-06-22 09:34:38 +01:00
parent 56918ef7ec
commit ca1aae6112
2 changed files with 35 additions and 60 deletions

View file

@ -1,4 +1,11 @@
{ config, pkgs, inputs, lib, nixpkgs-nixos-unstable-and-unfree, ... }: { {
config,
pkgs,
inputs,
lib,
nixpkgs-nixos-unstable-and-unfree,
...
}: {
networking.hostName = "foryog"; networking.hostName = "foryog";
imports = [ imports = [
@ -15,12 +22,11 @@
../../zsh ../../zsh
]; ];
fileSystems."/" = { options = [ "compress=zstd" ]; }; fileSystems."/" = {options = ["compress=zstd"];};
boot.kernelParams = boot.kernelParams = ["initcall_debug" ''dyndbg="file suspend.c +p"'' "no_console_suspend"];
[ "initcall_debug" ''dyndbg="file suspend.c +p"'' "no_console_suspend" ];
boot.tmp.cleanOnBoot = true; boot.tmp.cleanOnBoot = true;
boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; boot.binfmt.emulatedSystems = ["aarch64-linux"];
boot.plymouth = { boot.plymouth = {
enable = true; enable = true;
logo = ./boot.png; logo = ./boot.png;
@ -47,9 +53,9 @@
}; };
}; };
}; };
services.fprintd = { enable = true; }; services.fprintd = {enable = true;};
programs.ccache.enable = true; programs.ccache.enable = true;
hardware.opengl.extraPackages = with pkgs; [ libva ]; hardware.opengl.extraPackages = with pkgs; [libva];
programs.steam.enable = true; programs.steam.enable = true;
nixpkgs.config.allowUnfreePredicate = pkg: nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [ builtins.elem (lib.getName pkg) [
@ -57,18 +63,20 @@
"steam-original" "steam-original"
"steam-runtime" "steam-runtime"
"steam-run" "steam-run"
"vscode-extension-ms-vscode-cpptools"
"vscode-with-extensions" "vscode-with-extensions"
"vscode" "vscode"
]; ];
home-manager.users.cyryl = { ... }: { home-manager.users.cyryl = {...}: {
imports = [ ../../home-manager/programs/kitty.nix ../../gui/vscode.nix ]; imports = [
home.packages = ../../home-manager/programs/kitty.nix
with inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux"; ../../home-manager/programs/helix.nix
[ bisq-desktop ] ++ ../../gui/vscode.nix
];
(with pkgs; [ lutris ]) home.packages = with inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux";
++ (with inputs.endless-sky.legacyPackages."x86_64-linux"; [bisq-desktop]
[ endless-sky ]); ++ (with pkgs; [lutris])
++ (with inputs.endless-sky.legacyPackages."x86_64-linux"; [endless-sky]);
}; };
} }

View file

@ -11,7 +11,17 @@
in { in {
programs.helix = { programs.helix = {
enable = true; enable = true;
package = inputs.helix.packages."${system}".helix; languages = {
nix = {
name = "nix";
auto-format = true;
language-server = {command = nil;};
formatter = {
command = alejandra;
args = ["-q"];
};
};
};
settings = { settings = {
theme = "solarized_peninsula"; theme = "solarized_peninsula";
editor = { editor = {
@ -20,38 +30,6 @@ in {
lsp.display-messages = true; lsp.display-messages = true;
line-number = "relative"; line-number = "relative";
}; };
keys = {
normal = {
";" = "command_mode";
C-p = "file_picker";
C-b = "buffer_picker";
"{" = ["goto_prev_paragraph" "collapse_selection"];
"}" = ["goto_next_paragraph" "collapse_selection"];
"0" = "goto_line_start";
"$" = "goto_line_end";
"^" = "goto_first_nonwhitespace";
G = "goto_file_end";
V = ["select_mode" "extend_to_line_bounds"];
};
select = {
"{" = ["extend_to_line_bounds" "goto_prev_paragraph"];
"}" = ["extend_to_line_bounds" "goto_next_paragraph"];
"0" = "goto_line_start";
"$" = "goto_line_end";
"^" = "goto_first_nonwhitespace";
G = "goto_file_end";
D = ["extend_to_line_bounds" "delete_selection" "normal_mode"];
C = ["goto_line_start" "extend_to_line_bounds" "change_selection"];
"%" = "match_brackets";
V = ["extend_to_line_bounds"];
i = "select_textobject_inner";
a = "select_textobject_around";
k = ["extend_line_up" "extend_to_line_bounds"];
j = ["extend_line_down" "extend_to_line_bounds"];
};
};
}; };
themes = { themes = {
solarized_peninsula = { solarized_peninsula = {
@ -143,16 +121,5 @@ in {
"error" = "red"; "error" = "red";
}; };
}; };
languages = [
{
name = "nix";
auto-format = true;
language-server = {command = nil;};
formatter = {
command = alejandra;
args = ["-q"];
};
}
];
}; };
} }