Reorganize pkgs, kak tweaks
parent
309c858862
commit
ee0c4462ee
18
flake.lock
18
flake.lock
|
@ -164,22 +164,22 @@
|
|||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-master": "nixpkgs-master",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"tokyonight-kak-src": "tokyonight-kak-src"
|
||||
"smarttab-kak-src": "smarttab-kak-src"
|
||||
}
|
||||
},
|
||||
"tokyonight-kak-src": {
|
||||
"smarttab-kak-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1636104069,
|
||||
"narHash": "sha256-dFe1iGLDuSGlpdI4AxR613KjhIGjbvKbrK/TPrpMJ4Y=",
|
||||
"owner": "HeavyRain266",
|
||||
"repo": "tokyonight.kak",
|
||||
"rev": "f7ebeea07818df8ee7ea8e71b4dbfd3c0afdc05b",
|
||||
"lastModified": 1649581983,
|
||||
"narHash": "sha256-STLZSwQPM+gTnkA+FQOF4I0ifPTjQWpEc/95JRzvIqU=",
|
||||
"owner": "andreyorst",
|
||||
"repo": "smarttab.kak",
|
||||
"rev": "86ac6599b13617ff938905ba4cdd8225d7eb6a2e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "HeavyRain266",
|
||||
"repo": "tokyonight.kak",
|
||||
"owner": "andreyorst",
|
||||
"repo": "smarttab.kak",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
|
|
15
flake.nix
15
flake.nix
|
@ -30,8 +30,8 @@
|
|||
flake = false;
|
||||
};
|
||||
|
||||
tokyonight-kak-src = {
|
||||
url = github:HeavyRain266/tokyonight.kak;
|
||||
smarttab-kak-src = {
|
||||
url = github:andreyorst/smarttab.kak;
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
@ -54,13 +54,12 @@
|
|||
overlays = attrValues self.overlays ++ singleton (
|
||||
final: prev:
|
||||
let
|
||||
buildPkg = name:
|
||||
final.callPackage
|
||||
(./. + "/pkgs/${name}.nix")
|
||||
{ "${name}-src" = inputs."${name}-src"; };
|
||||
pkgs = [ "dark-mode-notify" "luar" "tokyonight-kak" ];
|
||||
pkgs = import ./pkgs {
|
||||
inherit inputs genAttrs;
|
||||
inherit (final) callPackage;
|
||||
};
|
||||
in
|
||||
genAttrs pkgs buildPkg // optionalAttrs
|
||||
pkgs // optionalAttrs
|
||||
(prev.stdenv.system == "aarch64-darwin")
|
||||
{
|
||||
# Sub in x86 version of packages that don't build on Apple Silicon yet
|
||||
|
|
|
@ -8,6 +8,47 @@
|
|||
|
||||
colorScheme = "tokyonight";
|
||||
|
||||
hooks = [
|
||||
{
|
||||
name = "BufOpenFile";
|
||||
option = ".*";
|
||||
commands = "expandtab";
|
||||
}
|
||||
{
|
||||
name = "BufNewFile";
|
||||
option = ".*";
|
||||
commands = "expandtab";
|
||||
}
|
||||
{
|
||||
name = "WinSetOption";
|
||||
option = "filetype=(makefile)";
|
||||
commands = "noexpandtab";
|
||||
}
|
||||
{
|
||||
name = "ModuleLoaded";
|
||||
option = "smarttab";
|
||||
commands = ''
|
||||
set-option global softtabstop %opt{indentwidth}
|
||||
'';
|
||||
}
|
||||
{
|
||||
name = "WinSetOption";
|
||||
option = "filetype=(haskell)";
|
||||
commands = ''
|
||||
lsp-enable-window
|
||||
'';
|
||||
}
|
||||
{
|
||||
name = "WinSetOption";
|
||||
option = "filetype=(haskell|nix)";
|
||||
commands = ''
|
||||
set-option window indentwidth 2
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
indentWidth = 4;
|
||||
|
||||
keyMappings = [
|
||||
{
|
||||
key = "<c-a-p>";
|
||||
|
@ -21,15 +62,11 @@
|
|||
mode = "normal";
|
||||
docstring = "Open fzf-mode file dialog with ctrl-p";
|
||||
}
|
||||
];
|
||||
|
||||
hooks = [
|
||||
{
|
||||
name = "WinSetOption";
|
||||
option = "filetype=(haskell)";
|
||||
commands = ''
|
||||
lsp-enable-window
|
||||
'';
|
||||
key = "<c-b>";
|
||||
effect = ": fzf-mode<ret>b<ret>";
|
||||
mode = "normal";
|
||||
docstring = "Open fzf-mode buffer dialog with ctrl-b";
|
||||
}
|
||||
];
|
||||
|
||||
|
@ -42,12 +79,13 @@
|
|||
|
||||
showMatching = true;
|
||||
|
||||
showWhitespace.enable = true;
|
||||
|
||||
ui.enableMouse = true;
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
eval %sh{${pkgs.kak-lsp}/bin/kak-lsp --kakoune -s $kak_session}
|
||||
powerline-start
|
||||
'';
|
||||
|
||||
plugins = with pkgs.kakounePlugins; [
|
||||
|
@ -58,11 +96,10 @@
|
|||
kakboard
|
||||
kakoune-state-save
|
||||
kakoune-vertical-selection
|
||||
powerline-kak
|
||||
pkgs.tokyonight-kak
|
||||
pkgs.smarttab-kak
|
||||
# needs luar
|
||||
# pkgs.luar
|
||||
# tabs-kak
|
||||
pkgs.luar
|
||||
tabs-kak
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
{ callPackage, inputs, genAttrs }:
|
||||
let
|
||||
buildPkg = name:
|
||||
callPackage
|
||||
(./. + "/${name}.nix")
|
||||
{ "${name}-src" = inputs."${name}-src"; };
|
||||
pkgs = [ "dark-mode-notify" "luar" "smarttab-kak" ];
|
||||
in
|
||||
genAttrs pkgs buildPkg
|
|
@ -0,0 +1,8 @@
|
|||
{ kakouneUtils, smarttab-kak-src, ... }:
|
||||
|
||||
with kakouneUtils;
|
||||
|
||||
buildKakounePlugin {
|
||||
name = "smarttab";
|
||||
src = smarttab-kak-src;
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
{ stdenv, tokyonight-kak-src, ... }:
|
||||
|
||||
let
|
||||
colorsPath = "share/kak/colors";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "tokyonight";
|
||||
src = tokyonight-kak-src;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
target=$out/${colorsPath}
|
||||
mkdir -p $target
|
||||
cp -r colors/*.kak $target
|
||||
runHook postInstall
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue