Update fish

This commit is contained in:
albert 2024-04-29 12:18:41 +09:00
parent 4cf23db8a9
commit cfe8335e1e
No known key found for this signature in database
GPG key ID: 64F6C4EB46C4543A
3 changed files with 12 additions and 9 deletions

View file

@ -2,6 +2,7 @@
imports = [ imports = [
./atuin.nix ./atuin.nix
./bash.nix ./bash.nix
./fish.nix
./btop.nix ./btop.nix
./starship.nix ./starship.nix
./git.nix ./git.nix

View file

@ -1,14 +1,16 @@
{ ... }: { { ... }: {
programs.kitty.shellIntegration.enableFishIntegration = true; programs.kitty.shellIntegration.enableFishIntegration = true;
programs.starship.enableFishIntegration = true;
programs.fish = { programs.fish = {
enable = true; enable = true;
interactiveShellInit = '' interactiveShellInit = ''
GPG_TTY=$(tty) set GPG_TTY $tty
EDITOR=vim set EDITOR vim
ssh-add > /dev/null &> /dev/null ssh-add > /dev/null &> /dev/null
if [ -z "$DISABLE_TMUX" ] && [ -z "$TMUX" ] ; then if [ -z "$DISABLE_TMUX" ] && [ -z "$TMUX" ];
tmux attach || exec tmux new-session && exit tmux attach || exec tmux new-session && exit
fi end
''; '';
functions = { functions = {
update_secrets = '' update_secrets = ''
@ -18,10 +20,10 @@
''; '';
restart-docker = '' restart-docker = ''
pushd /Storage/Data/docker-compose/sysctl.io/ pushd /Storage/Data/docker-compose/sysctl.io/
docker stop $1 docker stop $argv
docker rm $1 docker rm $argv
git pull git pull
docker compose up -d $1 docker compose up -d $argv
popd popd
''; '';
# Build ISOs/SD Card Images # Build ISOs/SD Card Images
@ -137,7 +139,7 @@
dl = "docker logs -f "; dl = "docker logs -f ";
dps = ''docker ps --format "table [{{.ID}}] {{.Names}}\t{{.Status}}\t{{.State}}\t{{.Label \"type\"}}"''; dps = ''docker ps --format "table [{{.ID}}] {{.Names}}\t{{.Status}}\t{{.State}}\t{{.Label \"type\"}}"'';
# bash / system # fish / system
ls = "exa --icons -F --group-directories-first --git"; ls = "exa --icons -F --group-directories-first --git";
cp = "rsync -avr"; cp = "rsync -avr";
ll = "exa -lah --icons -F --group-directories-first --git"; ll = "exa -lah --icons -F --group-directories-first --git";
@ -177,6 +179,5 @@
rebuild-home-remote = "git -C /etc/nixos/git pull && home-manager switch -b backup --flake /etc/nixos/git --max-jobs 0"; rebuild-home-remote = "git -C /etc/nixos/git pull && home-manager switch -b backup --flake /etc/nixos/git --max-jobs 0";
rebuild-all-remote = "rebuild-host-remote && rebuild-home-remote"; rebuild-all-remote = "rebuild-host-remote && rebuild-home-remote";
}; };
}; };
} }

View file

@ -2,6 +2,7 @@
imports = [ imports = [
# Common configs # Common configs
./common/software/cli/bash.nix ./common/software/cli/bash.nix
./common/software/cli/fish.nix
./common/software/cli/git.nix ./common/software/cli/git.nix
# ./common/software/cli/nixvim/base.nix # ./common/software/cli/nixvim/base.nix
./common/software/cli/ssh.nix ./common/software/cli/ssh.nix