{ 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; }; kak.rust = mkEnableOption "Rust support in Kakoune"; kak.ts = mkEnableOption "TypeScript support in Kakoune"; kak.haskell = mkEnableOption "Haskell support in Kakoune"; kak.python = mkEnableOption "Python 3.9 support in Kakoune"; kak.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; }) ]; }; }