Files
Main/2 Personal/Home Lab/MAC/Dotfiles.md

126 lines
5.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# How I have setup the dotfiles to be automated.
## Mackup
A tool to manage my dotfiles and configuration files.
https://github.com/lra/mackup
## Macprefs
A tool to backup all the settings of my mac:
https://github.com/clintmod/macprefs
It seems outdated.
# VIM
## ~/.vimrc
```dotfile
syntax on # enables syntax highlighing
set number
```
# Inspiration
- chezmoi
- ansible
- [ ] https://github.com/christophrumpel/dotfiles setup my own backup strategy, also [this](https://github.com/driesvints/dotfiles) #todo/p
# Difftools
delta vs difftastic vs diff-so-fancy
---
## Todos
- [ ] look at all apps in mackup list. look at alternative terminals, look at customizing iterm
- [ ] installation script to automatically install all apps (brew, mas, brew --cask)
- [ ] installation script to automatically install oh my zsh and apply profile settings
- [ ] test chezmoi on ubuntu as well
- [ ] find if there is a cron manager: where all cron scripts can be found
- [ ] create a bin folder for my custom scripts
- [ ] mail setup
- [ ] settings backup macos
- [ ] dock settings
- [ ] move shortcuts from old macbook
- [ ] iterm and itsycal do not keep their settings
- [ ] [Managing preference plists under Chezmoi | zacwest](https://zacwe.st/2021/09/14/managing-preference-plists.html)
- [ ] add .cursor settings to chezmoi
- [ ] make script and add to cron --> update all apps daily with homebrew and send notification to telegram bot
- [ ] maybe use a cron http managment tool that keeps track of all jobs
- [ ] sourcetree settings to chezmoi
- [ ] clean up ssh keys: find a good system: maximum of 6 keys (hybrid approach see below)
> [!NOTE]- SSH Keys Strategy
> should I use one ssh key for everything or one key per service?
>
> ###### ChatGPT said:
>
> It depends on your security needs and convenience. Heres a breakdown of **when to use one SSH key for everything** versus **one key per service**.
>
> ---
>
> ## **🔹 Option 1: Use One SSH Key for Everything**
>
> 💡 **Best for simplicity**
> If you dont need strict access separation, using a single SSH key across multiple services (GitHub, GitLab, work servers, personal VPS) is convenient.
>
> ### ✅ **Pros**
>
> - **Easy to manage** → One key to maintain, back up, and use.
> - **Less configuration** → No need to specify different keys per service.
> - **Works out of the box** with services like GitHub and remote servers.
>
> ### ❌ **Cons**
>
> - **Security risk** → If your private key is compromised, **all** services using it are vulnerable.
> - **Difficult to revoke access** → If one service is compromised, you must change your key **everywhere**.
> - **Might not work for corporate environments** → Some companies require you to use a **separate** SSH key for work.
>
> ---
>
> ## **🔹 Option 2: Use One SSH Key Per Service**
>
> 💡 **Best for security and flexibility**
> You generate a different SSH key for each service (GitHub, work, personal servers, etc.).
>
> ### ✅ **Pros**
>
> - **Better security** → If one key gets compromised, only **one** service is affected.
> - **Easier revocation** → If you leave a job or lose access to a service, you can revoke just that key.
> - **Some services enforce it** → Many companies require work-specific SSH keys for compliance reasons.
>
> ### ❌ **Cons**
>
> - **More setup complexity** → You have to generate and manage multiple keys.
> - **More configuration required** → You must specify which key to use for each service.
>
> ---
>
> ## **🔹 Recommended Approach: Hybrid Setup**
>
> 💡 **Balance security and convenience**
>
> - **One key for personal use** (GitHub, GitLab, Bitbucket).
> - **One key for work** (Used only for job-related SSH access).
> - **One key per personal VPS or server** (Especially if managing multiple servers).
> - **One-time-use keys** (For temporary projects or shared access).
>
> ### **Example SSH Config for Multiple Keys (`~/.ssh/config`):**
>
> sh
>
> CopyEdit
>
> `Host github.com User git IdentityFile ~/.ssh/id_github Host gitlab.com User git IdentityFile ~/.ssh/id_gitlab Host work-server User claudio IdentityFile ~/.ssh/id_work Host personal-server User claudio IdentityFile ~/.ssh/id_personal`
>
> 👉 **Benefit:** SSH automatically selects the correct key based on the hostname.
>
> ---
>
> ## **🔹 Summary: Which One Should You Choose?**
>
> |Approach|When to Use|Pros|Cons|
> |---|---|---|---|
> |🔹 **One key for everything**|If you want **simplicity**|Easy to set up, no extra config|Higher security risk if compromised|
> |🔹 **One key per service**|If you want **better security**|Granular control, easier revocation|More setup complexity|
> |🔹 **Hybrid approach**|If you want **a balance of both**|Security + convenience|Some extra setup required|
>
> 🚀 **Final Recommendation:** Use **one key per category** (e.g., personal, work, servers), but **not necessarily one key per service** unless security requires it.
>
> Let me know if you need help setting this up! 😊