refactor: complete rewrite
This commit is contained in:
parent
19a4bbda3c
commit
8e81943cf9
399 changed files with 3396 additions and 8042 deletions
32
modules/home/console/shell/zsh/default.nix
Normal file
32
modules/home/console/shell/zsh/default.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
14
modules/home/console/shell/zsh/plugins.nix
Normal file
14
modules/home/console/shell/zsh/plugins.nix
Normal 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";
|
||||
}
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue