config/modules/kak/default.nix

53 lines
1.2 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.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
2022-01-10 19:25:34 +01:00
2022-05-16 17:57:58 +02:00
with lib; {
2022-05-19 19:58:26 +02:00
options.riley = {
2022-05-15 23:32:21 +02:00
kak.enable = (mkEnableOption "kakoune editor") // { default = true; };
2022-05-15 23:32:21 +02:00
kak.rust = mkEnableOption "Rust support in Kakoune";
2022-05-16 17:44:49 +02:00
kak.ts = mkEnableOption "TypeScript support in Kakoune";
2022-05-15 23:32:21 +02:00
kak.haskell = mkEnableOption "Haskell support in Kakoune";
2022-05-16 17:44:49 +02:00
kak.python = mkEnableOption "Python 3.9 support in Kakoune";
kak.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
environment.systemPackages = [
2022-05-19 19:58:26 +02:00
(import ./kakoune.nix {
2022-05-16 17:57:58 +02:00
2022-05-19 19:58: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-19 19:58:26 +02:00
inherit kak-crosshairs;
2022-05-19 19:58:26 +02:00
inherit pkgs lib theme;
2022-05-16 17:57:58 +02:00
})
];
};
2022-01-10 19:25:34 +01:00
}