Migrate Zsh config
This commit is contained in:
parent
2599d9ddfa
commit
b8c758615b
@ -2,7 +2,7 @@
|
||||
description = "Yadunand's Configuration";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
snowfall-lib = {
|
||||
url = "github:snowfallorg/lib";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
68
homes/aarch64-darwin/yadunut@yadunut-mbp/default.nix
Normal file
68
homes/aarch64-darwin/yadunut@yadunut-mbp/default.nix
Normal file
@ -0,0 +1,68 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# This value determines the Home Manager release that your configuration is
|
||||
# compatible with. This helps avoid breakage when a new Home Manager release
|
||||
# introduces backwards incompatible changes.
|
||||
#
|
||||
# You should not change this value, even if you update Home Manager. If you do
|
||||
# want to update the value, then make sure to first check the Home Manager
|
||||
# release notes.
|
||||
home.stateVersion = "23.11"; # Please read the comment before changing.
|
||||
|
||||
home.packages = [
|
||||
# pkgs.dive
|
||||
pkgs.entr
|
||||
pkgs.lazygit
|
||||
pkgs.jq
|
||||
pkgs.just
|
||||
pkgs.rsync
|
||||
pkgs.gh
|
||||
pkgs.claude-code
|
||||
pkgs.devenv
|
||||
pkgs.jujutsu
|
||||
pkgs.dive
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
JAVA_HOME = "/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home";
|
||||
ANDROID_HOME = "$HOME/Library/Android/sdk";
|
||||
};
|
||||
|
||||
home.sessionPath = [
|
||||
"$ANDROID_HOME/emulator"
|
||||
"$ANDROID_HOME/platform-tools"
|
||||
"/opt/homebrew/bin"
|
||||
];
|
||||
|
||||
programs.zsh.shellAliases = {
|
||||
lg = "lazygit";
|
||||
};
|
||||
|
||||
zsh.enable = true;
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
programs.git.extraConfig = {
|
||||
gpg.ssh.program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign";
|
||||
user.signingkey = "~/.ssh/yadunut_ed25519.pub";
|
||||
core.excludesFile = "~/.gitignore_global";
|
||||
};
|
||||
|
||||
programs.gh = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
targets.darwin = {
|
||||
defaults."com.apple.dock".autohide = true;
|
||||
defaults."com.apple.finder".AppleShowAllFiles = true;
|
||||
defaults.NSGlobalDomain.AppleShowAllExtensions = true;
|
||||
defaults.NSGlobalDomain.KeyRepeat = 2;
|
||||
defaults.NSGlobalDomain.ApplePressAndHoldEnabled = false;
|
||||
};
|
||||
}
|
90
modules/home/zsh/default.nix
Normal file
90
modules/home/zsh/default.nix
Normal file
@ -0,0 +1,90 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.zsh;
|
||||
inherit (lib) mkEnableOption mkIf mkOption;
|
||||
in
|
||||
{
|
||||
options.zsh = {
|
||||
enable = mkEnableOption "Zsh";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
home.packages = with pkgs; [
|
||||
zsh-completions
|
||||
fd
|
||||
htop
|
||||
ripgrep
|
||||
wget
|
||||
delta
|
||||
];
|
||||
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs.dircolors = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
config = {
|
||||
hide_env_diff = true;
|
||||
};
|
||||
};
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
autosuggestion.enable = true;
|
||||
autocd = true;
|
||||
history = {
|
||||
size = 1000000;
|
||||
extended = true;
|
||||
append = true;
|
||||
expireDuplicatesFirst = true;
|
||||
ignoreDups = true;
|
||||
ignoreAllDups = true;
|
||||
ignoreSpace = true;
|
||||
};
|
||||
historySubstringSearch.enable = true;
|
||||
shellAliases = {
|
||||
cat = "bat --theme=\"$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo 'gruvbox-dark' || echo 'gruvbox-light')\"";
|
||||
diff = "delta";
|
||||
};
|
||||
};
|
||||
programs.fzf.enable = true;
|
||||
programs.fzf.enableZshIntegration = true;
|
||||
|
||||
programs.zoxide.enable = true;
|
||||
programs.zoxide.enableZshIntegration = true;
|
||||
|
||||
programs.eza = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
extraOptions = [ "--group-directories-first" ];
|
||||
};
|
||||
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
settings = {
|
||||
nodejs.disabled = true;
|
||||
package.disabled = true;
|
||||
aws.disabled = true;
|
||||
python.disabled = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user