Go, bottom and gpg
This commit is contained in:
parent
cbd4278c77
commit
f63f05579a
6 changed files with 69 additions and 120 deletions
8
home.nix
8
home.nix
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
unstable = import <nixos-unstable> {};
|
unstable = import <nixos-unstable> {};
|
||||||
|
|
@ -22,7 +22,6 @@ in {
|
||||||
procps-ng
|
procps-ng
|
||||||
mmv-go
|
mmv-go
|
||||||
terminator
|
terminator
|
||||||
bottom
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -30,14 +29,17 @@ in {
|
||||||
./modules/alacritty.nix
|
./modules/alacritty.nix
|
||||||
./modules/bat.nix
|
./modules/bat.nix
|
||||||
./modules/broot.nix
|
./modules/broot.nix
|
||||||
|
./modules/bottom.nix
|
||||||
./modules/dircolors.nix
|
./modules/dircolors.nix
|
||||||
|
./modules/fzf.nix
|
||||||
./modules/git.nix
|
./modules/git.nix
|
||||||
|
./modules/go.nix
|
||||||
|
./modules/gpg.nix
|
||||||
./modules/kakoune.nix
|
./modules/kakoune.nix
|
||||||
./modules/qogir_theme.nix
|
./modules/qogir_theme.nix
|
||||||
./modules/rofi.nix
|
./modules/rofi.nix
|
||||||
./modules/sxhkd.nix
|
./modules/sxhkd.nix
|
||||||
./modules/terminator.nix
|
./modules/terminator.nix
|
||||||
./modules/fzf.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
|
|
|
||||||
11
modules/bottom.nix
Normal file
11
modules/bottom.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{ pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
tomlGenerate = (pkgs.formats.toml {}).generate "bottom-toml";
|
||||||
|
in {
|
||||||
|
home.packages = [ pkgs.bottom ];
|
||||||
|
xdg.configFile."bottom/bottom.toml".source = tomlGenerate {
|
||||||
|
"flags" = {
|
||||||
|
"left_legend" = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
5
modules/go.nix
Normal file
5
modules/go.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
programs.go = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
14
modules/gpg.nix
Normal file
14
modules/gpg.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
programs.gpg = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.gpg-agent = {
|
||||||
|
enable = true;
|
||||||
|
defaultCacheTtl = 600;
|
||||||
|
# extraConfig = "allow-loopback-pinentry";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -25,126 +25,43 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
highlightCursor = true;
|
highlightCursor = true;
|
||||||
};
|
};
|
||||||
keyMappings = [{
|
keyMappings = [
|
||||||
mode = "normal";
|
{ mode = "normal"; docstring = "Open file"; key = "<c-o>"; effect = ":edit<space>"; }
|
||||||
docstring = "Open file";
|
{ mode = "user"; docstring = "Comment block"; key = "b"; effect = ":comment-block<ret>"; }
|
||||||
key = "<c-o>";
|
{ mode = "user"; docstring = "Comment line"; key = "l"; effect = ":comment-line<ret>"; }
|
||||||
effect = ":edit<space>";
|
{ mode = "user"; docstring = "Show hover info"; key = "q"; effect = ":lsp-hover<ret>"; }
|
||||||
} {
|
{ mode = "user"; docstring = "Jump to definition"; key = "d"; effect = ":lsp-definition<ret>"; }
|
||||||
mode = "user";
|
{ mode = "user"; docstring = "List project diagnostics"; key = "i"; effect = ":lsp-diagnostics<ret>"; }
|
||||||
docstring = "Comment block";
|
{ mode = "user"; docstring = "Jump to type definition"; key = "t"; effect = ":lsp-type-definition<ret>"; }
|
||||||
key = "b";
|
{ mode = "user"; docstring = "Code actions"; key = "a"; effect = ":lsp-code-actions<ret>"; }
|
||||||
effect = ":comment-block<ret>";
|
{ mode = "user"; docstring = "Format code"; key = "F"; effect = ":lsp-formatting-sync<ret>"; }
|
||||||
} {
|
{ mode = "user"; docstring = "Spellcheck"; key = "s"; effect = ":spell "; }
|
||||||
mode = "user";
|
{ mode = "user"; docstring = "Spellcheck English"; key = "S"; effect = ":spell en<ret>"; }
|
||||||
docstring = "Comment line";
|
{ mode = "user"; docstring = "Copy to clipboard"; key = "y"; effect = "<a-|>${pkgs.xclip}/bin/xclip -i -selection clipboard<ret>"; }
|
||||||
key = "l";
|
{ mode = "user"; docstring = "Paste from clipboard (before)"; key = "p"; effect = "!${pkgs.xclip}/bin/xclip -selection clipboard -o<ret>"; }
|
||||||
effect = ":comment-line<ret>";
|
{ mode = "user"; docstring = "Paste from clipboard (after)"; key = "P"; effect = "<a-!>${pkgs.xclip}/bin/xclip -selection clipboard -o<ret>"; }
|
||||||
} {
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Show hover info";
|
|
||||||
key = "q";
|
|
||||||
effect = ":lsp-hover<ret>";
|
|
||||||
} {
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Jump to definition";
|
|
||||||
key = "d";
|
|
||||||
effect = ":lsp-definition<ret>";
|
|
||||||
} {
|
|
||||||
mode = "user";
|
|
||||||
docstring = "List project diagnostics";
|
|
||||||
key = "i";
|
|
||||||
effect = ":lsp-diagnostics<ret>";
|
|
||||||
} {
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Jump to type definition";
|
|
||||||
key = "t";
|
|
||||||
effect = ":lsp-type-definition<ret>";
|
|
||||||
} {
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Code actions";
|
|
||||||
key = "a";
|
|
||||||
effect = ":lsp-code-actions<ret>";
|
|
||||||
} {
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Format code";
|
|
||||||
key = "F";
|
|
||||||
effect = ":lsp-formatting-sync<ret>";
|
|
||||||
} {
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Spellcheck";
|
|
||||||
key = "s";
|
|
||||||
effect = ":spell ";
|
|
||||||
} {
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Spellcheck English";
|
|
||||||
key = "S";
|
|
||||||
effect = ":spell en<ret>";
|
|
||||||
} {
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Copy to clipboard";
|
|
||||||
key = "y";
|
|
||||||
effect = "<a-|>${pkgs.xclip}/bin/xclip -i -selection clipboard<ret>";
|
|
||||||
} {
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Paste from clipboard (before)";
|
|
||||||
key = "p";
|
|
||||||
effect = "!${pkgs.xclip}/bin/xclip -selection clipboard -o<ret>";
|
|
||||||
} {
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Paste from clipboard (after)";
|
|
||||||
key = "P";
|
|
||||||
effect = "<a-!>${pkgs.xclip}/bin/xclip -selection clipboard -o<ret>";
|
|
||||||
}];
|
|
||||||
hooks = [{
|
|
||||||
name = "WinSetOption";
|
|
||||||
option = "filetype=(rust|python|c|cpp|latex|javascript|go)";
|
|
||||||
commands = builtins.concatStringsSep "\n" [
|
|
||||||
"lsp-enable-window"
|
|
||||||
];
|
];
|
||||||
} {
|
hooks = [
|
||||||
name = "BufCreate";
|
{ name = "WinSetOption"; option = "filetype=(rust|python|c|cpp|latex|javascript|go)"; commands = builtins.concatStringsSep "\n" [ "lsp-enable-window" ]; }
|
||||||
option = ".*";
|
{ name = "BufCreate"; option = ".*"; commands = "editorconfig-load"; }
|
||||||
commands = "editorconfig-load";
|
# { name = "ModuleLoaded"; option = "powerline"; commands = builtins.concatStringsSep "\n" [ "powerline-enable" ]; }
|
||||||
} {
|
# { name = "ModuleLoaded"; option = "auto-pairs"; commands = "auto-pairs-enable"; }
|
||||||
name = "ModuleLoaded";
|
{ name = "InsertCompletionShow"; option = ".*"; commands = builtins.concatStringsSep "\n" [ "map window insert <tab> <c-n>" "map window insert <s-tab> <c-p>" ]; }
|
||||||
option = "powerline";
|
{ name = "InsertCompletionHide"; option = ".*"; commands = builtins.concatStringsSep "\n" [ "unmap window insert <tab> <c-n>" "unmap window insert <s-tab> <c-p>" ]; }
|
||||||
commands = builtins.concatStringsSep "\n" [
|
|
||||||
# "powerline-theme default"
|
|
||||||
"powerline-enable"
|
|
||||||
];
|
];
|
||||||
} {
|
|
||||||
name = "ModuleLoaded";
|
|
||||||
option = "auto-pairs";
|
|
||||||
commands = "auto-pairs-enable";
|
|
||||||
} {
|
|
||||||
name = "InsertCompletionShow";
|
|
||||||
option = ".*";
|
|
||||||
commands = builtins.concatStringsSep "\n" [
|
|
||||||
"map window insert <tab> <c-n>"
|
|
||||||
"map window insert <s-tab> <c-p>"
|
|
||||||
];
|
|
||||||
} {
|
|
||||||
name = "InsertCompletionHide";
|
|
||||||
option = ".*";
|
|
||||||
commands = builtins.concatStringsSep "\n" [
|
|
||||||
"unmap window insert <tab> <c-n>"
|
|
||||||
"unmap window insert <s-tab> <c-p>"
|
|
||||||
];
|
|
||||||
}];
|
|
||||||
};
|
};
|
||||||
extraConfig = builtins.concatStringsSep "\n" [
|
extraConfig = builtins.concatStringsSep "\n" [
|
||||||
"# Extra"
|
"# Extra"
|
||||||
"define-command -docstring 'save and quit' x 'write-all; quit'"
|
"define-command -docstring 'save and quit' x 'write-all; quit'"
|
||||||
"add-highlighter global/ regex \\h+$ 0:Error"
|
"add-highlighter global/ regex \\h+$ 0:Error # "
|
||||||
"eval %sh{kak-lsp --kakoune -s \$kak_session}"
|
"eval %sh{kak-lsp --kakoune -s \$kak_session} # Start kak-lsp"
|
||||||
"require-module auto-pairs"
|
# "require-module auto-pairs"
|
||||||
"require-module powerline"
|
# "require-module powerline"
|
||||||
];
|
];
|
||||||
plugins = with pkgs; [
|
plugins = with pkgs.kakounePlugins; [
|
||||||
kakounePlugins.kak-auto-pairs
|
kak-auto-pairs
|
||||||
unstable.kakounePlugins.powerline-kak
|
# unstable.kakounePlugins.powerline-kak
|
||||||
unstable.kakounePlugins.prelude-kak
|
# unstable.kakounePlugins.prelude-kak
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,10 +28,10 @@
|
||||||
in {
|
in {
|
||||||
enable = true;
|
enable = true;
|
||||||
keybindings = {
|
keybindings = {
|
||||||
"super + Return" = "${bash} -c ${alacritty} || ${terminator}";
|
"super + Return" = "${bash} -c ${alacritty} || /usr/bin/alacritty || ${terminator}";
|
||||||
"super + @space" = "${rofi} -show drun";
|
"super + @space" = "${rofi} -show drun";
|
||||||
"super + e" = "${nautilus} -w";
|
"super + e" = "${nautilus} -w";
|
||||||
"super + alt + m" = ''${betterlockscreen} -l -t "Welcome back $USER"'';
|
"super + alt + {,+ shift} + m" = ''${betterlockscreen} {-l,-s} -t "Welcome back $USER"'';
|
||||||
"super + Escape" = "pkill -USR1 -x sxhkd";
|
"super + Escape" = "pkill -USR1 -x sxhkd";
|
||||||
"super + alt + {q,r}" = "${bspc} {quit,wm -r}";
|
"super + alt + {q,r}" = "${bspc} {quit,wm -r}";
|
||||||
"super + {_,shift + }w" = "${bspc} node -{c,k}";
|
"super + {_,shift + }w" = "${bspc} node -{c,k}";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue