Setup hooks for chezmoi apply, setup nushell

This commit is contained in:
Tyler Mayoff 2025-02-01 10:27:14 -05:00
parent fe689a9a67
commit 2e6db891ec
7 changed files with 38 additions and 89 deletions

View file

@ -1,8 +1,6 @@
{
inputs,
outputs,
# lib,
# config,
pkgs,
...
}: {
@ -16,6 +14,7 @@
xdg.enable = true;
imports = [
./shell.nix
./fish.nix
./nushell.nix
# ./nom.nix
@ -32,9 +31,6 @@
};
home.packages = with pkgs; [
# Fonts
#(nerdfonts.override {fonts = ["JetBrainsMono"];})
unstable.nix-output-monitor
# dotfiles
@ -114,6 +110,10 @@
shellWrapperName = "y";
};
programs.zoxide = {
enable = true;
};
home.stateVersion = "23.11";
programs.home-manager.enable = true;
}

View file

@ -0,0 +1,21 @@
{...}: {
home.shellAliases = {
# Git
gc = "git commit";
gcm = "git commit -m";
# gac = "git add . and git commit";
# gacp = "gac and git push";
gs = "git status";
# nix
flake = "nix flake";
# home-manager
hm-upgrade = "nix flake update --flake ~/.local/share/chezmoi/dot_config/flake#";
hm-update = "home-manager switch --flake ~/.config/flake";
# chezmoi
dot_apply = "chezmoi apply";
dot_pull = "chezmoi update";
};
}

View file

@ -39,36 +39,5 @@
src = pkgs.fishPlugins.forgit.src;
}
];
shellAliases = {
# ls
ls = "eza $eza_params";
l = "eza --git-ignore $eza_params";
ll = "eza --all --header --long $eza_params";
llm = "eza --all --header --long --sort=modified $eza_params";
la = "eza -lbhHigUmuSa";
lx = "eza -lbhHigUmuSa@";
lt = "eza --tree $eza_params";
tree = "eza --tree $eza_params";
# Git
gc = "git commit";
gcm = "git commit -m";
gac = "git add . && git commit";
gacp = "gac && git push";
gs = "git status";
# yac = "yadm add . && yadm commit";
# yacp = "yac && yadm push";
# yc = "pushd $HOME/.local/share/yadm/repo.git && git-forgit add && yadm commit && popd";
# yd = "pushd $HOME/.local/share/yadm/repo.git && git-forgit diff && popd";
# nix
flake = "nix flake";
# home-manager
hm-upgrade = "nix flake update --flake ~/.local/share/chezmoi/dot_config/flake#";
hm-update = "home-manager switch --flake ~/.config/flake";
};
};
}

View file

@ -1,6 +1,6 @@
{pkgs, ...}: {
home.packages = with pkgs; [
gnome.gnome-tweaks
gnome-tweaks
];
programs.gnome-shell = {

View file

@ -1,44 +1,15 @@
{pkgs, ...}: {
{config, ...}: {
programs.nushell = {
enable = true;
envFile = {
text = ''
$env.EDITOR = hx
$env.GIT_EDITOR = $env.EDITOR
$env.DEBMAIL = "tyler@tylermayoff.com"
$env.XDG_CONFIG_HOME = "$HOME/.config"
$env.XDG_CACHE_HOME = "$HOME/.cache"
$env.XDG_DATA_HOME = "$HOME/.local/share"
$env.XDG_STATE_HOME = "$HOME/.local/state"
shellAliases =
config.home.shellAliases;
zoxide init nushell | save -f ~/.config/nushell/zoxide.nu
'';
};
extraConfig = ''
$env.config.show_banner = false
shellAliases = {
# Git
gc = "git commit";
gcm = "git commit -m";
gac = "git add . and git commit";
gacp = "gac and git push";
gs = "git status";
yac = "yadm add --interactive and yadm commit";
yacp = "yac and yadm push";
# nix
flake = "nix flake";
# home-manager
hm-upgrade = "nix flake update --flake ~/.config/home-manager/";
hm-update = "home-manager switch --impure";
};
configFile = {
text = ''
source ~/.config/nushell/zoxide.nu
'';
};
def gac [] { git add .; git commit }
def gacp [] { gac; git push }
'';
};
}