config/modules/kak/default.nix

53 lines
1.3 KiB
Nix
Raw Normal View History

2022-01-10 19:25:34 +01:00
{ lib, pkgs, config, ... }:
2022-05-19 19:58:26 +02:00
with pkgs.kakouneUtils;
let cfg = config.custom.kak;
theme = config.custom.gui.theme;
2022-05-23 13:17:26 +02:00
kak-crosshairs = buildKakounePlugin (rec {
name = "kak-crosshairs";
src = (pkgs.fetchFromGitHub {
owner = "insipx";
repo = name;
rev = "7edba13c535ce1bc67356b1c9461f5d261949d29";
sha256 = "sha256-VOn9GGHludJasEwcCv6t1Q3/63w9139MCEkdRDnTw6E";
});
});
2022-05-19 19:58:26 +02:00
in
2022-01-10 19:25:34 +01:00
2022-05-16 17:57:58 +02:00
with lib; {
options.custom.kak = {
2022-05-15 23:32:21 +02:00
2022-05-23 13:17:26 +02:00
enable = (mkEnableOption "kakoune editor") // { default = true; };
2022-05-15 23:32:21 +02:00
2022-05-23 13:17:26 +02:00
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; };
2022-05-15 23:32:21 +02:00
};
2022-05-19 19:58:26 +02:00
config = mkIf (cfg.enable) {
2022-05-16 17:57:58 +02:00
2022-05-23 13:17:26 +02:00
environment.systemPackages = [
(import ./kakoune.nix {
2022-05-16 17:57:58 +02:00
2022-05-23 13:17:26 +02:00
typescript = cfg.ts;
haskell = cfg.haskell;
python = cfg.python;
rust = cfg.rust;
nix = cfg.nix;
2022-05-16 17:57:58 +02:00
2022-05-23 13:17:26 +02:00
inherit kak-crosshairs;
2022-05-23 13:17:26 +02:00
inherit pkgs lib theme;
})
];
};
2022-01-10 19:25:34 +01:00
}