mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
Configure zsh
This commit is contained in:
parent
c9b3277d95
commit
349e926e32
6 changed files with 60 additions and 25 deletions
|
|
@ -1,26 +1,43 @@
|
|||
{ pkgs, lib, config, osConfig, ... }: {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
cfg = config.mods.terminal;
|
||||
|
||||
history = {
|
||||
save = 2097152;
|
||||
size = 2097152;
|
||||
expireDuplicatesFirst = true;
|
||||
ignoreDups = true;
|
||||
ignoreSpace = true;
|
||||
path = "${config.xdg.dataHome}/zsh/history";
|
||||
};
|
||||
aliases = {
|
||||
la = "ls -lah";
|
||||
};
|
||||
|
||||
zplug = {
|
||||
in {
|
||||
options.mods.terminal = {
|
||||
zsh.enable = lib.mkEnableOption "enables zsh";
|
||||
};
|
||||
|
||||
config = {
|
||||
programs.starship.enable = true;
|
||||
|
||||
programs.zsh = lib.mkIf cfg.zsh.enable {
|
||||
enable = true;
|
||||
plugins = [
|
||||
{ name = "jeffreytse/zsh-vi-mode"; }
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
history = {
|
||||
save = 2097152;
|
||||
size = 2097152;
|
||||
expireDuplicatesFirst = true;
|
||||
ignoreDups = true;
|
||||
ignoreSpace = true;
|
||||
path = "${config.xdg.dataHome}/zsh/history";
|
||||
};
|
||||
|
||||
shellAliases = aliases;
|
||||
|
||||
plugins = with pkgs; [
|
||||
{
|
||||
name = "zsh-vi-mode";
|
||||
src = zsh-vi-mode;
|
||||
file = "share/zsh-vi-mode/zsh-vi-mode.plugin.zsh";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
programs.starship.enable = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,24 @@
|
|||
{ pkgs, lib, config, ... }: {
|
||||
options.mods.terminal.tools.enable = lib.mkEnableOption "enables cli tools";
|
||||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
cfg = config.mods.terminal;
|
||||
in with lib; {
|
||||
options.mods.terminal.tools.enable = mkEnableOption "enables cli tools";
|
||||
|
||||
config = lib.mkIf config.mods.terminal.tools.enable {
|
||||
programs.zellij.enable = true;
|
||||
config = mkIf cfg.tools.enable {
|
||||
programs.zellij = {
|
||||
enable = true;
|
||||
enableZshIntegration = mkIf cfg.zsh.enable true;
|
||||
};
|
||||
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableZshIntegration = mkIf cfg.zsh.enable true;
|
||||
};
|
||||
|
||||
programs.dircolors = {
|
||||
enable = true;
|
||||
enableZshIntegration = mkIf cfg.zsh.enable true;
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# libraries
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
clean.extraArgs = "--keep-since 4d --keep 3";
|
||||
flake = "/home/${config.mods.user.name}/.config/home";
|
||||
};
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
nix.settings = {
|
||||
substituters = [
|
||||
"https://cache.nixos.org"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue