/dotfiles

🏡 Home sweet ~/.

Primary LanguageLuaMIT LicenseMIT

Dotfiles

MacOS Install iTerm2

  • iTerm Color Scheme
  • Atom One Dark theme for Terminal
  • Preferences -> Profiles -> Terminal -> Terminal Emulation -> Report Terminal Type and chosing xterm-256color
  • Preferences -> Profiles -> Text -> Non-ASCII Font -> Change Font -> Select Instelled nerd-fonts
  • Preferences -> Profiles -> Keys -> Key Mappings -> Presets -> Select Natural Text Editing

MacOS Install Wrap

Windows Config winget

winget install `
Microsoft.WindowsTerminal `
Microsoft.Powershell

Windows Install Scoop

iex (new-object net.webclient).downloadstring('https://get.scoop.sh')

scoop install `
age `
bitwarden-cli `
chezmoi `
cloudflared `
git `
sudo `
neovim

MacOS Install Homebrew

brew install\
 fish\
 sk\
 rg\
 fzf\
 asdf\
 navi\
 zoxide\
 lsd\
 starship\
 fd\
 jq\
 yq\
 bat\
 gitui\
 mosh\
 trash\
 zellij\
 procs\
 sd\
 dust\
 grex\
 git-delta\
 bandwhich\
 nushell\
 atuin\
 cloudflared\
 bitwarden-cli\
 age\
 sops\
 wget\
 chezmoi

brew tap neovim/neovim
brew install neovim

brew tap cjbassi/ytop
brew install ytop

brew tap homebrew/cask-fonts 
brew install font-meslo-lg-nerd-font

brew install\
 kubectl\
 helm

*nix Config fish shell

## x86
echo /usr/local/bin/fish | sudo tee -a /etc/shells
chsh -s /usr/local/bin/fish

## arm
echo /opt/homebrew/bin/fish | sudo tee -a /etc/shells
chsh -s /opt/homebrew/bin/fish

*nix Install Fisher

curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher

Install Dotfiles with chezmoi

# need key.txt (age) on ~
chezmoi init --ssh --apply dfdgsdfg

# ssh config 
chezmoi init --prompt --apply
chezmoi data

*nix Config asdf

asdf plugin add python
asdf install python miniconda3-latest
asdf global python miniconda3-latest

Config Neovim

npm i -g neovim
pip install pynvim
gem install neovim

Install Apps

Config SSH Daemon

  • Turn off password auth
sudo tee /etc/ssh/sshd_config.d/turnoff-password.conf << EOF
PermitRootLogin no
PasswordAuthentication no
PermitEmptyPasswords no
ChallengeResponseAuthentication no
EOF
# https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_server_configuration
sudo Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0

sudo Set-Service -Name sshd -StartupType 'Automatic'

if (!(Get-NetFirewallRule -Name "OpenSSH-Server-In-TCP" -ErrorAction SilentlyContinue | Select-Object Name, Enabled)) {
    Write-Output "Firewall Rule 'OpenSSH-Server-In-TCP' does not exist, creating it..."
    New-NetFirewallRule -Name 'OpenSSH-Server-In-TCP' -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
} else {
    Write-Output "Firewall rule 'OpenSSH-Server-In-TCP' has been created and exists."
}

$sshd_config = "$env:PROGRAMDATA\ssh\sshd_config"

$turnoffpassword = @"
PermitRootLogin no
PasswordAuthentication no
PermitEmptyPasswords no
"@

sudo Add-Content $sshd_config $turnoffpassword
(sudo Get-Content $sshd_config) -replace 'Match Group administrators', '#Match Group administrators' | Set-Content $sshd_config
(sudo Get-Content $sshd_config) -replace 'AuthorizedKeysFile __PROGRAMDATA__', '#AuthorizedKeysFile __PROGRAMDATA__' | Set-Content $sshd_config

sudo Restart-Service sshd