configs consolidation

This commit is contained in:
Anton Volnuhin 2024-05-21 02:25:07 +03:00
parent 0a3cc83592
commit f733e75c1d
3 changed files with 17 additions and 22 deletions

View File

@ -1,7 +0,0 @@
#!/usr/bin/env bash
set Green '\033[0;32m' # Green
set NC '\033[0m' # No Color
{{ if eq .chezmoi.os "linux" -}}
sudo timedatectl set-timezone Europe/Moscow
{{ end -}}

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
#Config
STEPS=12
STEPS=14
PAD_LEN=4
BASE_PACKAGES="gnupg curl wget git gcc pipx"
@ -86,6 +86,16 @@ pad() {
print_block
new_line "Installing my authorized_keys"
mkdir ~/.ssh 2>/dev/null || true
cp ~/.ssh/authorized_keys ~/.ssh/authorized_keys.old 2>/dev/null || true
##print only unique lines
cat ~/.ssh/authorized_keys.old <(echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPdqIDeRKDOh7NQDcqnmLH/6M0ys7Wt/SEnF6ZYqroiH") 2>/dev/null | awk '!seen[$1]++' > ~/.ssh/authorized_keys
new_line "Update caches and upgrade packages"
{{ if eq .chezmoi.os "darwin" -}}
@ -189,10 +199,12 @@ new_line "via NIX"
tar xf lazygit.tar.gz lazygit 2>&1|pad
sudo install lazygit /usr/local/bin 2>&1|pad
nix-env -iA nixpkgs.jump nixpkgs.skim nixpkgs.du-dust nixpkgs.atuin 2>&1|pad
{{ if eq .chezmoi.osRelease.id "debian" -}}
nix-env -iA nixpkgs.neovim 2>&1|pad
{{ end -}}
nix-env -iA nixpkgs.neovim nixpkgs.jump nixpkgs.skim nixpkgs.du-dust nixpkgs.atuin 2>&1|pad
{{ end -}}
{{ if eq .chezmoi.os "linux" -}}
new_line "Setting timezone to Moscow"
sudo timedatectl set-timezone Europe/Moscow
{{ end -}}
new_line "Installing shell-gpt"

View File

@ -1,10 +0,0 @@
#!/usr/bin/env bash
cd
mkdir ~/.ssh
cp ~/.ssh/authorized_keys ~/.ssh/authorized_keys.old 2>/dev/null || true
##print only unique lines
cat ~/.ssh/authorized_keys.old <(echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPdqIDeRKDOh7NQDcqnmLH/6M0ys7Wt/SEnF6ZYqroiH") 2>/dev/null | awk '!seen[$1]++' > ~/.ssh/authorized_keys