feat(zsh): add fixnm alias

This commit is contained in:
Badstagram 2025-12-07 20:49:39 +00:00
parent 8f350fcaaf
commit e70ae77530

View File

@ -32,3 +32,30 @@ alias ..="cd .."
alias ...="cd ../.."
alias czm="chezmoi"
alias takeown="chown $USER:$USER"
function _log() {
local GREEN="\e[32m"
local RESET="\e[0m"
echo -e "[${GREEN}√${RESET}] $1"
}
function fixnm() {
sudo systemctl start systemd-resolved
_log "Started systemd-resolved"
sudo ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
_log "Created symlink /run/systemd/resolve/stub-resolv.conf -> /etc/resolv.conf"
sudo systemctl restart systemd-resolved
_log "Restarted systemd-resolved"
sudo systemctl restart NetworkManager
_log "Restarted NetworkManager"
sudo systemctl restart tailscaled.service
_log "Restarted tailscaled.service"
}