mirror of
https://github.com/fredrikr79/nixos.git
synced 2025-12-20 08:14:36 +01:00
keyboard etc etc
This commit is contained in:
@@ -90,7 +90,7 @@ in
|
||||
# DVORAK + NO
|
||||
layout = "us,no";
|
||||
xkbVariant = "dvp,";
|
||||
xkbOptions = "compose:menu, grp:alt_shift_toggle";
|
||||
xkbOptions = "compose:menu, grp:alt_shift_toggle, lv3:ralt_switch";
|
||||
|
||||
windowManager = {
|
||||
xmonad = {
|
||||
@@ -173,6 +173,7 @@ in
|
||||
haskellPackages.xmobar
|
||||
feh
|
||||
trayer
|
||||
xclip
|
||||
# xorg.xbacklight
|
||||
# htop
|
||||
]);
|
||||
@@ -263,5 +264,32 @@ in
|
||||
lidSwitch = "hybrid-sleep";
|
||||
powerKey = "hibernate";
|
||||
};
|
||||
|
||||
fonts = {
|
||||
packages = with pkgs; [
|
||||
(nerdfonts.override { fonts = [ "FiraCode" "Monoid" ]; })
|
||||
];
|
||||
|
||||
fontconfig = {
|
||||
defaultFonts = {
|
||||
monospace = [ "Monoid" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# video acceleration
|
||||
# nixpkgs.config.packageOverrides = pkgs: {
|
||||
# intel-vaapi-driver = pkgs.intel-vaapi-driver.override { enableHybridCodec = true; };
|
||||
# };
|
||||
# hardware.opengl = { # hardware.graphics on unstable
|
||||
# enable = true;
|
||||
# extraPackages = with pkgs; [
|
||||
# intel-media-driver # LIBVA_DRIVER_NAME=iHD
|
||||
# intel-vaapi-driver # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
|
||||
# libvdpau-va-gl
|
||||
# ];
|
||||
# };
|
||||
# environment.sessionVariables = { LIBVA_DRIVER_NAME = "iHD"; }; # Force intel-media-driver
|
||||
|
||||
}
|
||||
|
||||
|
||||
102
home.nix
102
home.nix
@@ -155,19 +155,29 @@
|
||||
];
|
||||
|
||||
window = {
|
||||
completion = {border = "solid";};
|
||||
documentation = {border = "solid";};
|
||||
completion = {
|
||||
winhighlight = "FloatBorder:CmpBorder,Normal:CmpPmenu,CursorLine:CmpSel,Search:PmenuSel";
|
||||
scrollbar = false;
|
||||
sidePadding = 0;
|
||||
border = [ "╭" "─" "╮" "│" "╯" "─" "╰" "│" ];
|
||||
};
|
||||
|
||||
settings.documentation = {
|
||||
border = [ "╭" "─" "╮" "│" "╯" "─" "╰" "│" ];
|
||||
winhighlight = "FloatBorder:CmpBorder,Normal:CmpPmenu,CursorLine:CmpSel,Search:PmenuSel";
|
||||
};
|
||||
};
|
||||
|
||||
mapping = {
|
||||
"<C-Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
|
||||
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
|
||||
"<S-Tab>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
|
||||
"<C-j>" = "cmp.mapping.select_next_item()";
|
||||
"<C-k>" = "cmp.mapping.select_prev_item()";
|
||||
"<C-e>" = "cmp.mapping.abort()";
|
||||
"<C-b>" = "cmp.mapping.scroll_docs(-4)";
|
||||
"<C-f>" = "cmp.mapping.scroll_docs(4)";
|
||||
"<C-Space>" = "cmp.mapping.complete()";
|
||||
"<C-CR>" = "cmp.mapping.confirm({ select = true })";
|
||||
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
||||
"<S-CR>" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true })";
|
||||
};
|
||||
};
|
||||
@@ -177,22 +187,55 @@
|
||||
cmp-buffer = {enable = true;};
|
||||
cmp-path = {enable = true;}; # file system paths
|
||||
cmp_luasnip = {enable = true;}; # snippets
|
||||
cmp-cmdline = {enable = false;}; # autocomplete for cmdline
|
||||
cmp-cmdline = {enable = true;}; # autocomplete for cmdline
|
||||
|
||||
|
||||
lsp = {
|
||||
enable = true;
|
||||
keymaps = {
|
||||
silent = true;
|
||||
diagnostic = {
|
||||
"<leader>j" = "goto_next";
|
||||
"<leader>k" = "goto_prev";
|
||||
"<leader>e" = "open_float";
|
||||
};
|
||||
lspBuf = {
|
||||
K = "hover";
|
||||
gD = "references";
|
||||
gd = "definition";
|
||||
gi = "implementation";
|
||||
gt = "type_definition";
|
||||
gd = {
|
||||
action = "definition";
|
||||
desc = "Goto Definition";
|
||||
};
|
||||
gr = {
|
||||
action = "references";
|
||||
desc = "Goto References";
|
||||
};
|
||||
gD = {
|
||||
action = "declaration";
|
||||
desc = "Goto Declaration";
|
||||
};
|
||||
gI = {
|
||||
action = "implementation";
|
||||
desc = "Goto Implementation";
|
||||
};
|
||||
gT = {
|
||||
action = "type_definition";
|
||||
desc = "Type Definition";
|
||||
};
|
||||
K = {
|
||||
action = "hover";
|
||||
desc = "Hover";
|
||||
};
|
||||
"<leader>cw" = {
|
||||
action = "workspace_symbol";
|
||||
desc = "Workspace Symbol";
|
||||
};
|
||||
"<leader>cr" = {
|
||||
action = "rename";
|
||||
desc = "Rename";
|
||||
};
|
||||
"<leader>ca" = {
|
||||
action = "code_action";
|
||||
desc = "code action";
|
||||
};
|
||||
};
|
||||
};
|
||||
servers = {
|
||||
@@ -231,6 +274,37 @@
|
||||
|
||||
which-key.enable = true;
|
||||
};
|
||||
extraConfigLua = ''
|
||||
luasnip = require("luasnip")
|
||||
|
||||
kind_icons = {
|
||||
Text = "",
|
||||
Method = "",
|
||||
Function = "",
|
||||
Constructor = "",
|
||||
Field = "",
|
||||
Variable = "",
|
||||
Class = "",
|
||||
Interface = "",
|
||||
Module = "",
|
||||
Property = "",
|
||||
Unit = "",
|
||||
Value = "",
|
||||
Enum = "",
|
||||
Keyword = "",
|
||||
Snippet = "",
|
||||
Color = "",
|
||||
File = "",
|
||||
Reference = "",
|
||||
Folder = "",
|
||||
EnumMember = "",
|
||||
Constant = "",
|
||||
Struct = "",
|
||||
Event = "",
|
||||
Operator = "",
|
||||
TypeParameter = "",
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
@@ -256,6 +330,14 @@
|
||||
suspend = "systemctl suspend";
|
||||
logout = "sudo pkill -u fredrikr";
|
||||
};
|
||||
|
||||
defaultKeymap = "viins";
|
||||
initExtra = ''
|
||||
bindkey -v
|
||||
bindkey -M viins 'jk' vi-cmd-mode
|
||||
'';
|
||||
|
||||
zsh-abbr.enable = true;
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
|
||||
Reference in New Issue
Block a user