mirror of
https://github.com/fredrikr79/nixos.git
synced 2025-12-20 16:24:36 +01:00
keyboard etc etc
This commit is contained in:
@@ -90,7 +90,7 @@ in
|
|||||||
# DVORAK + NO
|
# DVORAK + NO
|
||||||
layout = "us,no";
|
layout = "us,no";
|
||||||
xkbVariant = "dvp,";
|
xkbVariant = "dvp,";
|
||||||
xkbOptions = "compose:menu, grp:alt_shift_toggle";
|
xkbOptions = "compose:menu, grp:alt_shift_toggle, lv3:ralt_switch";
|
||||||
|
|
||||||
windowManager = {
|
windowManager = {
|
||||||
xmonad = {
|
xmonad = {
|
||||||
@@ -173,6 +173,7 @@ in
|
|||||||
haskellPackages.xmobar
|
haskellPackages.xmobar
|
||||||
feh
|
feh
|
||||||
trayer
|
trayer
|
||||||
|
xclip
|
||||||
# xorg.xbacklight
|
# xorg.xbacklight
|
||||||
# htop
|
# htop
|
||||||
]);
|
]);
|
||||||
@@ -263,5 +264,32 @@ in
|
|||||||
lidSwitch = "hybrid-sleep";
|
lidSwitch = "hybrid-sleep";
|
||||||
powerKey = "hibernate";
|
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 = {
|
window = {
|
||||||
completion = {border = "solid";};
|
completion = {
|
||||||
documentation = {border = "solid";};
|
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 = {
|
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-j>" = "cmp.mapping.select_next_item()";
|
||||||
"<C-k>" = "cmp.mapping.select_prev_item()";
|
"<C-k>" = "cmp.mapping.select_prev_item()";
|
||||||
"<C-e>" = "cmp.mapping.abort()";
|
"<C-e>" = "cmp.mapping.abort()";
|
||||||
"<C-b>" = "cmp.mapping.scroll_docs(-4)";
|
"<C-b>" = "cmp.mapping.scroll_docs(-4)";
|
||||||
"<C-f>" = "cmp.mapping.scroll_docs(4)";
|
"<C-f>" = "cmp.mapping.scroll_docs(4)";
|
||||||
"<C-Space>" = "cmp.mapping.complete()";
|
"<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 })";
|
"<S-CR>" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true })";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -177,22 +187,55 @@
|
|||||||
cmp-buffer = {enable = true;};
|
cmp-buffer = {enable = true;};
|
||||||
cmp-path = {enable = true;}; # file system paths
|
cmp-path = {enable = true;}; # file system paths
|
||||||
cmp_luasnip = {enable = true;}; # snippets
|
cmp_luasnip = {enable = true;}; # snippets
|
||||||
cmp-cmdline = {enable = false;}; # autocomplete for cmdline
|
cmp-cmdline = {enable = true;}; # autocomplete for cmdline
|
||||||
|
|
||||||
|
|
||||||
lsp = {
|
lsp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
keymaps = {
|
keymaps = {
|
||||||
|
silent = true;
|
||||||
diagnostic = {
|
diagnostic = {
|
||||||
"<leader>j" = "goto_next";
|
"<leader>j" = "goto_next";
|
||||||
"<leader>k" = "goto_prev";
|
"<leader>k" = "goto_prev";
|
||||||
"<leader>e" = "open_float";
|
"<leader>e" = "open_float";
|
||||||
};
|
};
|
||||||
lspBuf = {
|
lspBuf = {
|
||||||
K = "hover";
|
gd = {
|
||||||
gD = "references";
|
action = "definition";
|
||||||
gd = "definition";
|
desc = "Goto Definition";
|
||||||
gi = "implementation";
|
};
|
||||||
gt = "type_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 = {
|
servers = {
|
||||||
@@ -231,6 +274,37 @@
|
|||||||
|
|
||||||
which-key.enable = true;
|
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 = {
|
programs.zsh = {
|
||||||
@@ -256,6 +330,14 @@
|
|||||||
suspend = "systemctl suspend";
|
suspend = "systemctl suspend";
|
||||||
logout = "sudo pkill -u fredrikr";
|
logout = "sudo pkill -u fredrikr";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
defaultKeymap = "viins";
|
||||||
|
initExtra = ''
|
||||||
|
bindkey -v
|
||||||
|
bindkey -M viins 'jk' vi-cmd-mode
|
||||||
|
'';
|
||||||
|
|
||||||
|
zsh-abbr.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
|
|||||||
Reference in New Issue
Block a user