Configure zsh

This commit is contained in:
muon 2024-06-12 14:56:28 +00:00
parent c9b3277d95
commit 349e926e32
6 changed files with 60 additions and 25 deletions

View file

@ -8,7 +8,6 @@ in {
];
# System
nix.settings.experimental-features = [ "nix-command" "flakes" ];
mods.user.name = "muon";
networking.hostName = cfg.user.name;

View file

@ -39,7 +39,8 @@
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.docker0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
networking.interfaces.enp0s31f6.mtu = 1200;
# networking.interfaces.tun0.useDHCP = lib.mkDefault true;
# networking.interfaces.vboxnet0.useDHCP = lib.mkDefault true;

View file

@ -9,6 +9,7 @@ let cfg = osConfig.mods; in {
programs.qutebrowser.enable = true;
mods.social.enable = true;
mods.i3.enable = true;
mods.terminal.zsh.enable = true;
mods.terminal.emulator.enable = true;
mods.terminal.development.enable = true;
mods.terminal.tools.enable = true;

View file

@ -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;
}

View file

@ -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

View file

@ -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"