aboutsummaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2023-09-29 09:46:31 -0400
committerEugene Triguba <eugenetriguba@gmail.com>2023-09-29 09:46:31 -0400
commit7485ee324601055fff36a6e5b4362bbd134ded1e (patch)
treec29ec3b25b54d7a40fdbb1e20ec03bf18fd4a57b /roles
parentAdd brewfile (diff)
downloaddotfiles-7485ee324601055fff36a6e5b4362bbd134ded1e.zip
Rework for mac
Diffstat (limited to 'roles')
-rw-r--r--roles/1password/tasks/main.yaml24
-rw-r--r--roles/docker/tasks/main.yaml33
-rw-r--r--roles/fonts/tasks/main.yaml13
-rw-r--r--roles/pyenv/tasks/main.yaml46
-rw-r--r--roles/pyenv/vars/main.yaml2
-rw-r--r--roles/user/files/.gdbinit1
-rw-r--r--roles/user/files/.gitconfig20
-rw-r--r--roles/user/files/.tmux.conf1
-rw-r--r--roles/user/files/wallpaper.jpgbin26719295 -> 0 bytes
-rw-r--r--roles/user/tasks/main.yaml43
-rw-r--r--roles/vim/files/init.vim78
-rw-r--r--roles/vim/tasks/main.yaml35
-rw-r--r--roles/vscode/tasks/main.yaml24
-rwxr-xr-xroles/zsh/files/.zshrc86
-rwxr-xr-xroles/zsh/tasks/main.yaml38
15 files changed, 0 insertions, 444 deletions
diff --git a/roles/1password/tasks/main.yaml b/roles/1password/tasks/main.yaml
deleted file mode 100644
index 88fe964..0000000
--- a/roles/1password/tasks/main.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-- name: Import 1Password key
- become: yes
- ansible.builtin.rpm_key:
- state: present
- key: https://downloads.1password.com/linux/keys/1password.asc
-
-- name: Add 1Password YUM Repo
- become: yes
- yum_repository:
- name: 1password
- description: 1Password Stable Channel
- baseurl: https://downloads.1password.com/linux/rpm/stable/$basearch
- enabled: yes
- gpgcheck: yes
- repo_gpgcheck: yes
- gpgkey: https://downloads.1password.com/linux/keys/1password.asc
- state: present
-
-- name: Install
- become: yes
- dnf:
- name: 1password
- state: present
diff --git a/roles/docker/tasks/main.yaml b/roles/docker/tasks/main.yaml
deleted file mode 100644
index bf529b0..0000000
--- a/roles/docker/tasks/main.yaml
+++ /dev/null
@@ -1,33 +0,0 @@
----
-- name: Install dnf core plugins
- become: yes
- dnf:
- name: dnf-plugins-core
- state: present
-
-- name: Add repo
- become: yes
- shell: |
- dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
-
-- name: Install
- become: yes
-
- dnf:
- name: "{{ item.key }}"
- state: "{{ item.value.state | default('present') }}"
-
- with_dict: "{{packages}}"
- vars:
- packages:
- docker-ce:
- docker-ce-cli:
- containerd.io:
- docker-compose-plugin:
-
-- name: Add current user to docker group
- become: yes
- ansible.builtin.user:
- append: yes
- name: "{{ ansible_user_id }}"
- groups: docker
diff --git a/roles/fonts/tasks/main.yaml b/roles/fonts/tasks/main.yaml
deleted file mode 100644
index f042c5d..0000000
--- a/roles/fonts/tasks/main.yaml
+++ /dev/null
@@ -1,13 +0,0 @@
----
-- name: Add Hack font COPR repo
- become: yes
- community.general.copr:
- host: copr.fedorainfracloud.org
- state: enabled
- name: zawertun/hack-fonts
-
-- name: Install
- become: yes
- dnf:
- name: hack-fonts
- state: present
diff --git a/roles/pyenv/tasks/main.yaml b/roles/pyenv/tasks/main.yaml
deleted file mode 100644
index 7a20c78..0000000
--- a/roles/pyenv/tasks/main.yaml
+++ /dev/null
@@ -1,46 +0,0 @@
----
-- name: Install build requirements
- become: yes
-
- dnf:
- name: "{{ item.key }}"
- state: "{{ item.value.state | default('present') }}"
-
- with_dict: "{{dnf}}"
- vars:
- dnf:
- make:
- gcc:
- zlib-devel:
- bzip2:
- bzip2-devel:
- readline-devel:
- sqlite:
- sqlite-devel:
- openssl-devel:
- tk-devel:
- libffi-devel:
- xz-devel:
-
-- name: Download
- ansible.builtin.git:
- repo: https://github.com/pyenv/pyenv.git
- dest: "{{ lookup('env', 'HOME') }}/.pyenv"
- version: v2.3.4
-
-- name: "Ensure shell startup file sets up correct environment"
- lineinfile:
- path: "{{ shell_startup_file_path }}"
- line: "{{ item.value.line }}"
- state: present
-
- with_dict: "{{lines}}"
- vars:
- # Assumption: This will only work for certain shells (like zsh, bash, etc.)
- lines:
- pyenv_root:
- line: export PYENV_ROOT="$HOME/.pyenv"
- export_pyenv_bin:
- line: command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
- pyenv_init:
- line: eval "$(pyenv init -)"
diff --git a/roles/pyenv/vars/main.yaml b/roles/pyenv/vars/main.yaml
deleted file mode 100644
index 1b89247..0000000
--- a/roles/pyenv/vars/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-shell_startup_file_path: "{{ lookup('env', 'HOME') }}/.zshrc"
diff --git a/roles/user/files/.gdbinit b/roles/user/files/.gdbinit
deleted file mode 100644
index 9422460..0000000
--- a/roles/user/files/.gdbinit
+++ /dev/null
@@ -1 +0,0 @@
-set disassembly-flavor intel
diff --git a/roles/user/files/.gitconfig b/roles/user/files/.gitconfig
deleted file mode 100644
index 1086dfa..0000000
--- a/roles/user/files/.gitconfig
+++ /dev/null
@@ -1,20 +0,0 @@
-[user]
- name = Eugene Triguba
- email = eugenetriguba@gmail.com
- signingkey = E2C90ACA3CC16B98
-[core]
- editor = vim
- whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
- excludesfile = ~/.gitignore
-[alias]
- undo = reset HEAD~
-[pull]
- ff = only
-[fetch]
- prune = true
-[diff]
- colorMoved = zebra
-[init]
- defaultBranch = main
-[commit]
- gpgsign = true
diff --git a/roles/user/files/.tmux.conf b/roles/user/files/.tmux.conf
deleted file mode 100644
index 207d7e8..0000000
--- a/roles/user/files/.tmux.conf
+++ /dev/null
@@ -1 +0,0 @@
-set -g mouse on
diff --git a/roles/user/files/wallpaper.jpg b/roles/user/files/wallpaper.jpg
deleted file mode 100644
index 94ae4cf..0000000
--- a/roles/user/files/wallpaper.jpg
+++ /dev/null
Binary files differ
diff --git a/roles/user/tasks/main.yaml b/roles/user/tasks/main.yaml
deleted file mode 100644
index 802d8c6..0000000
--- a/roles/user/tasks/main.yaml
+++ /dev/null
@@ -1,43 +0,0 @@
----
-- name: Link dotfiles
- file:
- src: "{{ item.value.src }}"
- dest: "{{ item.value.dest }}"
- state: link
- with_dict: "{{dotfiles}}"
- vars:
- dotfiles:
- gitconfig:
- src: "{{ role_path }}/files/.gitconfig"
- dest: "{{ lookup('env', 'HOME') }}/.gitconfig"
- gdbinit:
- src: "{{ role_path }}/files/.gdbinit"
- dest: "{{ lookup('env', 'HOME') }}/.gdbinit"
- tmux:
- src: "{{ role_path }}/files/.tmux.conf"
- dest: "{{ lookup('env', 'HOME') }}/.tmux.conf"
-
-- name: Link wallpaper
- file:
- src: "{{ role_path }}/files/wallpaper.jpg"
- dest: "$HOME/Pictures/wallpaper.jpg"
- state: link
-
-- name: Install general packages
- become: yes
-
- dnf:
- name: "{{ item.key }}"
- state: "{{ item.value.state | default('present') }}"
-
- with_dict: "{{dnf}}"
- vars:
- dnf:
- "@Development tools":
- curl:
- firefox:
- git:
- openssl:
- ripgrep:
- rsync:
- wget:
diff --git a/roles/vim/files/init.vim b/roles/vim/files/init.vim
deleted file mode 100644
index 0c98b73..0000000
--- a/roles/vim/files/init.vim
+++ /dev/null
@@ -1,78 +0,0 @@
-" Flash screen instead of beep sound
-set visualbell
-
-" Change how vim represents characters on the screen
-set encoding=utf-8
-
-" Set the encoding of files written
-set fileencoding=utf-8
-
-" Set line numbers
-set number
-
-" don't break up words at end of window width
-set linebreak
-
-" Specify different areas of the screen where splits should occur
-set splitbelow
-set splitright
-
-" Python-specific whitespace file settings
-autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4
-" ts - show existing tab with 4 spaces width
-" sw - when indenting with '>', use 4 spaces width
-" sts - control <tab> and <bs> keys to match tabstop
-
-" General whitespace settings
-set shiftwidth=4
-filetype plugin indent on
-
-" Allow backspace to delete indentation and inserted text
-" i.e. how it works in most programs
-set backspace=indent,eol,start
-" indent allow backspacing over autoindent
-" eol allow backspacing over line breaks (join lines)
-" start allow backspacing over the start of insert; CTRL-W and CTRL-U
-" stop once at the start of insert.
-call plug#begin("$HOME/.config/nvim/plugged")
-
-" Auto complete
-Plug 'Valloric/YouCompleteMe'
-
-" Fuzzy finder
-Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
-
-" Git gutter
-Plug 'airblade/vim-gitgutter'
-
-" Status bar
-Plug 'vim-airline/vim-airline'
-
-" Git wrapper with :G
-Plug 'tpope/vim-fugitive'
-
-" Editorconfig file support
-Plug 'editorconfig/editorconfig-vim'
-
-" Theme
-Plug 'sainnhe/everforest'
-
-" Terraform
-Plug 'hashivim/vim-terraform'
-
-call plug#end()
-
-if has('termguicolors')
- set termguicolors
-endif
-
-set background=dark
-
-let g:everforest_background = 'soft'
-let g:everforest_better_performance = 1
-let g:everforest_disable_italic_comment = 1
-let g:airline_theme = 'everforest'
-
-syntax on
-colorscheme everforest
-
diff --git a/roles/vim/tasks/main.yaml b/roles/vim/tasks/main.yaml
deleted file mode 100644
index 0609f9b..0000000
--- a/roles/vim/tasks/main.yaml
+++ /dev/null
@@ -1,35 +0,0 @@
----
-- name: Create folders
- file:
- path: "{{ lookup('env', 'HOME') }}/.config/nvim/autoload"
- state: directory
-
-- name: Link configuration
- file:
- src: "{{ role_path }}/files/init.vim"
- dest: "{{ lookup('env', 'HOME') }}/.config/nvim/init.vim"
- state: link
-
-- name: Install packages
- become: yes
-
- dnf:
- name: "{{ item.key }}"
- state: "{{ item.value.state | default('present') }}"
-
- with_dict: "{{packages}}"
- vars:
- packages:
- python:
- python-devel:
- python-neovim:
- vim:
- neovim:
-
-- name: Install vim-plug
- get_url:
- url: https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
- dest: "$HOME/.config/nvim/autoload/plug.vim"
-
-- name: Install vim-plug plugins
- shell: nvim +PlugInstall +qall --headless
diff --git a/roles/vscode/tasks/main.yaml b/roles/vscode/tasks/main.yaml
deleted file mode 100644
index 476ccc9..0000000
--- a/roles/vscode/tasks/main.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-- name: Import Microsoft Key
- become: yes
- ansible.builtin.rpm_key:
- state: present
- key: https://packages.microsoft.com/keys/microsoft.asc
-
-- name: Add YUM Repo
- become: yes
- yum_repository:
- name: vscode
- description: Visual Studio Code
- baseurl: https://packages.microsoft.com/yumrepos/vscode
- enabled: yes
- gpgcheck: yes
- repo_gpgcheck: yes
- gpgkey: https://packages.microsoft.com/keys/microsoft.asc
- state: present
-
-- name: Install
- become: yes
- dnf:
- name: code
- state: present
diff --git a/roles/zsh/files/.zshrc b/roles/zsh/files/.zshrc
deleted file mode 100755
index 8d25a49..0000000
--- a/roles/zsh/files/.zshrc
+++ /dev/null
@@ -1,86 +0,0 @@
-autoload -Uz vcs_info
-zstyle ":vcs_info:*" enable git svn
-zstyle ':vcs_info:git:*' formats '%F{green}(%b)%f '
-precmd() {
- vcs_info
-}
-setopt prompt_subst
-NEWLINE=$'\n'
-PROMPT=' %2~ ${vcs_info_msg_0_}%# '
-
-export HISTFILE=~/.zhistory
-export HISTSIZE=100000
-export SAVEHIST=100000
-
-export EDITOR="nvim"
-export BROWSER="firefox"
-export PAGER="less"
-
-export GPG_TTY=$(tty)
-
-export SRC_DIR="$HOME/src"
-export BIN_DIR="$HOME/bin"
-
-export PATH="$HOME/.poetry/bin:$PATH"
-export PATH="$GOPATH/bin:$PATH"
-export PATH="$GOROOT/bin:$PATH"
-export PATH="$HOME/.local/bin:$PATH"
-export PATH="$BIN_DIR:$PATH"
-
-export GOPATH="$SRC_DIR/go"
-export GOBIN="$SRC_DIR/go/bin"
-
-export PYENV_ROOT="$HOME/.pyenv"
-export PATH="$PYENV_ROOT/bin:$PATH"
-command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
-eval "$(pyenv init -)"
-
-export NVM_DIR="$HOME/.nvm"
-[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
-
-alias gs="git status"
-alias gc="git commit"
-alias ga="git add"
-alias gd="git diff"
-alias gds="git diff --staged"
-alias gp="git push"
-alias gpo='git push origin'
-alias gplrb='git pull --rebase'
-alias gpl="git pull"
-alias gl='git log'
-alias gch="git checkout"
-alias gcb='git checkout -b'
-alias gv='git log --graph --decorate --oneline'
-
-alias h="history 25"
-alias j="jobs -l"
-alias l="ls -alG"
-alias o="xdg-open ."
-alias open="xdg-open"
-
-alias vi="nvim"
-alias vim="nvim"
-
-# "Compile C Program"
-#
-# $1: Program Name
-# $2: Output File (default: a.out)
-# $3: C Standard (default: c11)
-#
-# Example: ccp main.c main c99
-ccp() {
- local prog_name=$1
- local output_file=${2:a.out}
- local std=${3:c11}
-
- cc -Wall -W -pedantic -ansi -std=$std -o $output_file $prog_name
-}
-
-memcheck() {
- G_DEBUG=always-malloc valgrind --tool=memcheck --leak-check=full --show-reachable=yes -s $1
-}
-
-gocover() {
- t="/tmp/go-cover.$$.tmp"
- go test -coverprofile=$t $@ && go tool cover -html=$t && unlink $t
-}
diff --git a/roles/zsh/tasks/main.yaml b/roles/zsh/tasks/main.yaml
deleted file mode 100755
index fe0c039..0000000
--- a/roles/zsh/tasks/main.yaml
+++ /dev/null
@@ -1,38 +0,0 @@
----
-- name: Install packages
- become: yes
-
- dnf:
- name: "{{ item.key }}"
- state: "{{ item.value.state | default('present') }}"
-
- with_dict: "{{dnf}}"
- vars:
- dnf:
- fzf:
- git:
- jq:
- jc:
- zsh:
-
-- name: Ensure shell is default for user
- vars:
- current_user: "{{ ansible_user_id }}"
- become: yes
- user:
- name: "{{ current_user }}"
- shell: /usr/bin/zsh
-
-- name: Link configuration
- file:
- src: "{{ role_path }}/files/.zshrc"
- dest: "{{ lookup('env', 'HOME') }}/.zshrc"
- state: link
-
-- name: Create folders
- file:
- path: "{{item}}"
- state: directory
- loop:
- - "{{ lookup('env', 'HOME') }}/src"
- - "{{ lookup('env', 'HOME') }}/bin"