refactor: complete rewrite

This commit is contained in:
ooks-io 2024-10-23 23:46:25 +13:00
parent 19a4bbda3c
commit 8e81943cf9
399 changed files with 3396 additions and 8042 deletions

View file

@ -0,0 +1,32 @@
{
lib,
config,
osConfig,
...
}: let
inherit (lib) mkIf mkEnableOption;
inherit (osConfig.ooknet.host) admin;
cfg = config.ooknet.home.zsh;
in {
imports = [
./plugins.nix
];
options.ooknet.home.zsh.enable = mkEnableOption "";
config = mkIf (cfg.enable || admin.shell == "zsh") {
programs.zsh = {
enable = true;
autocd = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
dotDir = ".config/zsh";
history = {
expireDuplicatesFirst = true;
path = "${config.xdg.dataHome}/zsh_history";
};
};
};
}

View file

@ -0,0 +1,14 @@
{pkgs, ...}: {
programs.zsh.plugins = [
{
name = "fast-syntax-highlighting";
file = "fast-syntax-highlighting";
src = "${pkgs.zsh-fast-syntax-highlighting}/share/zsh/site-functions";
}
{
name = "zsh-autopair";
file = "autopair.zsh";
src = "${pkgs.zsh-autopair}/share/zsh/zsh-autopair";
}
];
}