rework bash functions

This commit is contained in:
iFargle 2024-02-13 08:24:37 +09:00
parent 2486ecb120
commit 30ab38b1c6
2 changed files with 4 additions and 15 deletions

View file

@ -41,7 +41,7 @@
enableCompletion = true; enableCompletion = true;
initExtra = '' initExtra = ''
GPG_TTY=$(tty) GPG_TTY=$(tty)
ssh-add ssh-add > /dev/null &> /dev/null
''; '';
sessionVariables = { sessionVariables = {
# Set the GTK Theme # Set the GTK Theme
@ -52,9 +52,11 @@
}; };
bashrcExtra = '' bashrcExtra = ''
restart-docker() { restart-docker() {
pushd /Storage/Data/docker-compose/sysctl.io
docker stop $1 docker stop $1
docker rm $1 docker rm $1
docker-compose up -d $1 docker-compose up -d $1
popd
} }
# Build ISOs/SD Card Images # Build ISOs/SD Card Images
nixos-build-all-images-verbose() { nixos-build-all-images-verbose() {
@ -149,19 +151,6 @@
sudo nix-env -u --always sudo nix-env -u --always
sudo nix-collect-garbage -d sudo nix-collect-garbage -d
} }
# Update SOPS Secrets
install-secrets() {
pushd /etc/nixos/git
nix develop -c update-repo
popd
}
update-repo() {
for i in $(ls secrets); do
echo "Updateing secrets/$i"
sops updatekeys secrets/$i -y
done
}
''; '';
shellAliases = { shellAliases = {
prime-select = "nvidia-offload"; prime-select = "nvidia-offload";

View file

@ -3,7 +3,7 @@
userName = "albert"; userName = "albert";
userEmail = "albert@sysctl.io"; userEmail = "albert@sysctl.io";
extraConfig = { extraConfig = {
core.askPass = false; # core.askPass = false;
credential.helper = "cache --timeout=25920000"; credential.helper = "cache --timeout=25920000";
user.signingkey = "64F6C4EB46C4543A"; user.signingkey = "64F6C4EB46C4543A";
commit.gpgsign = "true"; commit.gpgsign = "true";