config/modules/kak/default.nix

53 lines
1.3 KiB
Nix

{ lib, pkgs, config, ... }:
with pkgs.kakouneUtils;
let cfg = config.riley.kak;
theme = config.riley.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.riley.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;
})
];
};
}