added more configs to dotfiles
This commit is contained in:
parent
8f3669b608
commit
cd2cfa7f86
8 changed files with 469 additions and 30 deletions
61
local-configs/zsh/default.nix
Normal file
61
local-configs/zsh/default.nix
Normal file
|
@ -0,0 +1,61 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
|
||||
dotDir = ".config/zsh";
|
||||
|
||||
history = {
|
||||
extended = true;
|
||||
};
|
||||
|
||||
localVariables = {
|
||||
# Enable Oh My Zsh history timestamp output.
|
||||
# See: https://github.com/ohmyzsh/ohmyzsh/wiki/Settings#hist_stamps
|
||||
HIST_STAMPS = "yyyy-mm-dd";
|
||||
};
|
||||
|
||||
# Make use of Oh My Zsh
|
||||
# See the projects sites:
|
||||
# https://ohmyz.sh/
|
||||
# https://github.com/ohmyzsh/ohmyzsh/
|
||||
# See the projects documentation:
|
||||
# https://github.com/ohmyzsh/ohmyzsh/wiki
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
theme = "agnoster";
|
||||
custom = "/home/forestcat/.config/oh-my-zsh-custom";
|
||||
plugins = [
|
||||
"history-substring-search"
|
||||
"timer"
|
||||
"pass"
|
||||
];
|
||||
extraConfig = ''
|
||||
# Only show the command execution timer, if the command ran for at least 15 seconds.
|
||||
TIMER_THRESHOLD=15
|
||||
'';
|
||||
};
|
||||
|
||||
initExtra = ''
|
||||
nx() {
|
||||
nix shell nixpkgs/nixos-23.11#$@
|
||||
}
|
||||
|
||||
# history-substring-search configuration
|
||||
# See: https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/history-substring-search#configuration
|
||||
# Ensure unique search results in history-substring-search.
|
||||
# Needs to be set here instead of in oh-my-zsh.extraConfig to work apparently.
|
||||
HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE=1
|
||||
'';
|
||||
|
||||
shellAliases = {
|
||||
# Others.
|
||||
miau = "echo miau";
|
||||
ll = "ls -l";
|
||||
cheetah = "curl -d 'Lena: Done ✓' https://ntfy.forestcat.org/cheetah";
|
||||
rebuild = "sudo nixos-rebuild switch --flake ~/nix-configs/ --show-trace";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue