Skip to content

Commit

Permalink
Merge pull request #8 from asajaroff/fedora-laptop
Browse files Browse the repository at this point in the history
Merging from current used branch
  • Loading branch information
asajaroff authored Sep 29, 2022
2 parents 0a583d6 + b004eec commit b8f1997
Show file tree
Hide file tree
Showing 9 changed files with 109 additions and 29 deletions.
76 changes: 61 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
.DEFAULT_GOAL := help
.PHONY: all

#
# Variables
# __ ____ _ _ __ ___
# \ \ / / _` | '__/ __|
# \ V / (_| | | \__ \
# \_/ \__,_|_| |___/
#
OS_ARCH := $(shell arch)
DOTFILES_DIR := ${HOME}/.dotfiles
GOBIN ?= $(shell go bin)
ASDF_DIR := ${HOME}/.asdf

# Help
help:
Expand All @@ -15,14 +17,12 @@ help:
#
# Init
#
init: git-submodules ## Initialize git-submodules

git-submodules: git-submodules-private ## Fetch and pull all git-submodules
init: git-config git-submodules-private ## Initialize git-submodules

git-submodules-private: ## Fetch and pull private git-submodules (requires auth)
ifneq ($(wildcard ${DOTFILES_DIR}/private.),)
@echo "Found a 'private' directory"
git submodule status
exit 0
else
@echo "Did not find a 'private' directory, so let's clone it"
git submodule update --init --recursive private
Expand All @@ -32,9 +32,12 @@ git-config: ## Configure git user and email
git config --global user.name "Alejandro Sajaroff"
git config --global user.email "asajaroff@users.noreply.github.com"

#
# Shell setup
#
# _ _ _
# | | | | |
# ___| |__ ___| | |
# / __| '_ \ / _ \ | |
# \__ \ | | | __/ | |
# |___/_| |_|\___|_|_|
shells: shell-requisites bash zsh tmux ## Setup zsh, bash and tmux configs

shell-requisites: ## Install starship add-on for bash/zsh
Expand Down Expand Up @@ -66,6 +69,10 @@ endif

editor: editor-requisites neovim neovim-plugins emacs-dep emacs doom-emacs ## Configure text editor

# ___ _ __ ___ __ _ ___ ___
# / _ \ '_ ` _ \ / _` |/ __/ __|
#| __/ | | | | | (_| | (__\__ \
# \___|_| |_| |_|\__,_|\___|___/
emacs-dep:
sudo dnf install git ripgrep

Expand All @@ -74,26 +81,65 @@ emacs:
@echo brew install emacs
@echo sudo dnf install emacs

DOOM_DIR := ${HOME}/.doom.d

doom-emacs:
git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d
~/.emacs.d/bin/doom install
@if test -d ${DOOM_DIR}; then git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d; ~/.emacs.d/bin/doom install; fi
ln -sf ${HOME}/.dotfiles/config/emacs/doom.d/config.el ${HOME}/.doom.d/config.el
ln -sf ${HOME}/.dotfiles/config/emacs/doom.d/init.el ${HOME}/.doom.d/init.el
ln -sf ${HOME}/.dotfiles/config/emacs/doom.d/packages.el ${HOME}/.doom.d/packages.el
~/.emacs.d/bin/doom sync

editor-requisites: ## Create vim folders
@echo "To build from sorce, follow this guide: https://github.com/neovim/neovim/wiki/Building-Neovim#build-prerequisites"
mkdir -p ${HOME}/.vim/swapfiles
mkdir -p ${HOME}/.vim/backupfiles
mkdir -p ${HOME}/.config/nvim/

neovim:
@echo neovim

neovim-plugins: ## Install Plug for neovim
sh -c 'curl -fLo "${HOME}/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'

# | |/ _|
# __ _ ___ __| | |_
# / _` / __|/ _` | _|
# | (_| \__ \ (_| | |
# \__,_|___/\__,_|_|
#
asdf: asdf-setup-plugins asdf-install-packages ## Installs `asdf` utility

asdf-reinstall: asdf-setup-terraform asdf-setup-vault asdf-setup-kubectl

asdf-install:
@if test -d ${ASDF_DIR}; then echo "asdf is installed at $(ASDF_DIR)"; else git clone https://github.com/asdf-vm/asdf.git $(ASDF_DIR) --branch v0.9.0; fi

asdf-setup-plugins:
asdf plugin-add boundary https://github.com/asdf-community/asdf-hashicorp.git
asdf plugin-add consul https://github.com/asdf-community/asdf-hashicorp.git
asdf plugin-add nomad https://github.com/asdf-community/asdf-hashicorp.git
asdf plugin-add packer https://github.com/asdf-community/asdf-hashicorp.git
asdf plugin-add terraform https://github.com/asdf-community/asdf-hashicorp.git
asdf plugin-add vault https://github.com/asdf-community/asdf-hashicorp.git
asdf plugin-add kubectl https://github.com/asdf-community/asdf-kubectl.git

asdf-setup-terraform:
asdf install terraform latest
asdf install terraform latest:1.1.
asdf install terraform 0.14.11
asdf install terraform latest:0.14.
asdf global terraform latest

asdf-setup-vault:
asdf install vault latest
asdf global vault latest

asdf-setup-kubectl:
asdf install kubectl latest
asdf install kubectl latest:1.22.
asdf install kubectl latest:1.19.
asdf install kubectl latest:1.18.
asdf global kubectl latest
=======
clean: ## Render a destructive statement
@echo "rm -rf ${DOTFILES_DIR}"

Expand Down
21 changes: 21 additions & 0 deletions config/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ case "$(uname -s)" in
;;
esac

#
# Containers
#
if [ -f /usr/bin/podman ]; then
alias docker=podman
fi
alias dlogs="docker logs"

# Editor config
#
#
Expand Down Expand Up @@ -88,3 +96,16 @@ alias aliasrc="nvim ${CONFIG_DIR}/aliases"
alias dotFiles="cd ~/.dotfiles"
alias devDotFiles="vim ~/.dotfiles"
alias aws-instances='aws ec2 describe-instances | view -'

if [[ -f ${ALIASES_DIR}/functions/jump.sh ]] ; then
echo "Sourcing private jump function"
source ${ALIASES_DIR}/functions/jump.sh
alias j=jump
else
echo "[ERR] jump function not found - Check private repo"
fi

# Kubernetes
alias kubectl="$(ls -1 /usr/local/bin/kubectl* | tail -n 1)"
alias helm="$(ls -1 /usr/local/bin/helm* | tail -n 1)"
alias argocd="$(ls -1 /usr/local/bin/argocd* | tail -n 1)"
4 changes: 2 additions & 2 deletions config/bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ fi

# Cloud tools
## asdf
ASDF_BIN=/usr/local/opt/asdf/libexec/asdf.sh
ASDF_BIN=~/.asdf/asdf.sh
if [[ -f "${ASDF_BIN}" ]]; then
source /usr/local/opt/asdf/libexec/asdf.sh
source ${ASDF_BIN}
fi

# Starship shell
Expand Down
2 changes: 1 addition & 1 deletion config/emacs/doom.d/config.el
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
;; There are two ways to load a theme. Both assume the theme is installed and
;; available. You can either set `doom-theme' or manually load a theme with the
;; `load-theme' function. This is the default:
(setq doom-theme 'doom-one-light)
(setq doom-theme 'doom-henna)

;; If you use `org' and don't want your org files in the default location below,
;; change `org-directory'. It must be set before org loads!
Expand Down
10 changes: 10 additions & 0 deletions docs/nfs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# NFS

## sudo mount it
```bash
sudo mount -o rw cajon:/Storage /mnt/nfs/storage/
```

## /etc/fstab

## Links
10 changes: 0 additions & 10 deletions functions/movement.sh

This file was deleted.

2 changes: 1 addition & 1 deletion private
2 changes: 2 additions & 0 deletions scripts/upgrade-bitwarden.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ Icon=/opt/bitwarden/icon128.png
Type=Application
Terminal=false
EOF

curl -L https://raw.githubusercontent.com/bitwarden/desktop/master/src/images/icon.png -o /opt/bitwarden/icon.png
11 changes: 11 additions & 0 deletions scripts/upgrade-chat.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cat << EOF > /usr/share/applications/teamwork-chat.desktop
[Desktop Entry]
Name=Teamwork Chat
GenericName=Chat client
Comment=Chat client
Exec=/opt/TeamworkChat/TeamworkChat-1.20.2.AppImage --no-sandbox
Icon=/opt/TeamworkChat/icon.png
Type=Application
Terminal=false
EOF

0 comments on commit b8f1997

Please sign in to comment.