config/modules/kak/default.nix

38 lines
863 B
Nix
Raw Normal View History

2022-01-10 19:25:34 +01:00
{ lib, pkgs, config, ... }:
2022-05-16 17:57:58 +02:00
let kakoune = import ./kakoune.nix; in
2022-01-10 19:25:34 +01:00
2022-05-16 17:57:58 +02:00
with lib; {
2022-05-15 23:32:21 +02:00
options.editor = {
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-16 17:57:58 +02:00
config = with config.editor; mkIf (kak.enable) {
environment.systemPackages = [
(kakoune {
inherit (kak) haskell python rust nix;
typescript = kak.ts;
kak-crosshairs = pkgs.kakounePlugins.kak-crosshairs;
2022-05-16 17:57:58 +02:00
inherit pkgs lib;
theme = config.riley.theme;
2022-05-16 17:57:58 +02:00
})
];
};
2022-01-10 19:25:34 +01:00
}