52 lines
1.3 KiB
Nix
52 lines
1.3 KiB
Nix
{ lib, pkgs, config, ... }:
|
|
|
|
with pkgs.kakouneUtils;
|
|
|
|
let cfg = config.custom.kak;
|
|
theme = config.custom.gui.theme;
|
|
kak-crosshairs = buildKakounePlugin (rec {
|
|
name = "kak-crosshairs";
|
|
src = (pkgs.fetchFromGitHub {
|
|
owner = "insipx";
|
|
repo = name;
|
|
rev = "7edba13c535ce1bc67356b1c9461f5d261949d29";
|
|
sha256 = "sha256-VOn9GGHludJasEwcCv6t1Q3/63w9139MCEkdRDnTw6E";
|
|
});
|
|
});
|
|
in
|
|
|
|
with lib; {
|
|
|
|
options.custom.kak = {
|
|
|
|
enable = (mkEnableOption "kakoune editor") // { default = true; };
|
|
|
|
rust = mkEnableOption "Rust support in Kakoune";
|
|
ts = mkEnableOption "TypeScript support in Kakoune";
|
|
haskell = mkEnableOption "Haskell support in Kakoune";
|
|
python = mkEnableOption "Python 3.9 support in Kakoune";
|
|
nix = (mkEnableOption "Nix support in Kakoune") // { default = true; };
|
|
|
|
};
|
|
|
|
config = mkIf (cfg.enable) {
|
|
|
|
environment.systemPackages = [
|
|
(import ./kakoune.nix {
|
|
|
|
typescript = cfg.ts;
|
|
haskell = cfg.haskell;
|
|
python = cfg.python;
|
|
rust = cfg.rust;
|
|
nix = cfg.nix;
|
|
|
|
inherit kak-crosshairs;
|
|
|
|
inherit pkgs lib theme;
|
|
|
|
})
|
|
];
|
|
|
|
};
|
|
|
|
}
|