v0.0.1
This commit is contained in:
commit
ba6296a2ec
39
README.md
Normal file
39
README.md
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
ericomeehan
|
||||||
|
=========
|
||||||
|
|
||||||
|
Ansible role to install user environment for ericomeehan.
|
||||||
|
|
||||||
|
Requirements
|
||||||
|
------------
|
||||||
|
|
||||||
|
A radical attitude.
|
||||||
|
|
||||||
|
Role Variables
|
||||||
|
--------------
|
||||||
|
|
||||||
|
None.
|
||||||
|
|
||||||
|
Dependencies
|
||||||
|
------------
|
||||||
|
|
||||||
|
None.
|
||||||
|
|
||||||
|
Example Playbook
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
|
||||||
|
|
||||||
|
- hosts: servers
|
||||||
|
roles:
|
||||||
|
- { role: ericomeehan.ericomeehan }
|
||||||
|
|
||||||
|
License
|
||||||
|
-------
|
||||||
|
|
||||||
|
BSD
|
||||||
|
|
||||||
|
Author Information
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Eric O'Neill Meehan
|
||||||
|
https://www.eom.dev/
|
2
defaults/main.yml
Normal file
2
defaults/main.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
# defaults file for ericomeehan.ericomeehan
|
5
files/gitconfig
Normal file
5
files/gitconfig
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[user]
|
||||||
|
email = eric@eom.dev
|
||||||
|
name = eric o meehan
|
||||||
|
[init]
|
||||||
|
defaultBranch = main
|
13
files/init.lua
Normal file
13
files/init.lua
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
vim.cmd([[
|
||||||
|
set nowrap
|
||||||
|
set number
|
||||||
|
set scrolloff=5
|
||||||
|
set colorcolumn=128
|
||||||
|
colorscheme elflord
|
||||||
|
hi ColorColumn ctermbg=lightgrey guibg=lightgrey
|
||||||
|
]])
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<C-Up>', '<C-w><up>', { silent = true })
|
||||||
|
vim.keymap.set('n', '<C-Down>', '<C-w><down>', { silent = true })
|
||||||
|
vim.keymap.set('n', '<C-Left>', '<C-w><left>', { silent = true })
|
||||||
|
vim.keymap.set('n', '<C-Right>', '<C-w><right>', { silent = true })
|
50
files/prompt_eric_setup
Normal file
50
files/prompt_eric_setup
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
# Generic large colour fade-bar prompt theme from bashprompt
|
||||||
|
# Created by James Manning <jmm@raleigh.ibm.com>
|
||||||
|
# Changed by Spidey 08/06
|
||||||
|
# Converted to zsh prompt theme by <adam@spiers.net>
|
||||||
|
|
||||||
|
prompt_bigfade_help () {
|
||||||
|
cat <<EOH
|
||||||
|
This prompt is color-scheme-able. You can invoke it thus:
|
||||||
|
|
||||||
|
prompt bigfade [<fade-bar> [<userhost> [<date> [<cwd>]]]]
|
||||||
|
|
||||||
|
where the parameters are the colors for the fade-bar, user@host text,
|
||||||
|
date text, and current working directory respectively. The default
|
||||||
|
colors are blue, white, white, and yellow. This theme works best with
|
||||||
|
a dark background.
|
||||||
|
|
||||||
|
|
||||||
|
Recommended fonts for this theme: either UTF-8, or nexus or vga or similar.
|
||||||
|
If you don't have any of these, the 8-bit characters will probably look
|
||||||
|
stupid.
|
||||||
|
EOH
|
||||||
|
}
|
||||||
|
|
||||||
|
prompt_bigfade_setup () {
|
||||||
|
local fadebar=${1:-'cyan'}
|
||||||
|
local userhost=${2:-'white'}
|
||||||
|
local date=${3:-'white'}
|
||||||
|
local cwd=${4:-'cyan'}
|
||||||
|
|
||||||
|
local -A schars
|
||||||
|
autoload -Uz prompt_special_chars
|
||||||
|
prompt_special_chars
|
||||||
|
|
||||||
|
PS1="%B%F{$fadebar}$schars[333]$schars[262]$schars[261]$schars[260]%B%F{$userhost}%K{$fadebar}%n@%m%b%k%f%F{$fadebar}%K{black}$schars[260]$schars[261]$schars[262]$schars[333]%b%f%k%F{$fadebar}%K{black}$schars[333]$schars[262]$schars[261]$schars[260]%B%F{$date}%b%f%k %D{%a %b %d} %D{%I:%M:%S%P} %B%F{$cwd}%d$prompt_newline> "
|
||||||
|
PS2="%B%F{$fadebar}>%b%f%k "
|
||||||
|
|
||||||
|
prompt_opts=(cr subst percent)
|
||||||
|
}
|
||||||
|
|
||||||
|
prompt_bigfade_preview () {
|
||||||
|
if (( ! $#* )); then
|
||||||
|
prompt_preview_theme bigfade
|
||||||
|
print
|
||||||
|
prompt_preview_theme bigfade red white grey white
|
||||||
|
else
|
||||||
|
prompt_preview_theme bigfade "$@"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
prompt_bigfade_setup "$@"
|
6
files/tmux.conf
Normal file
6
files/tmux.conf
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
bind '"' split-window -c "#{pane_current_path}"
|
||||||
|
bind '%' split-window -h -c "#{pane_current_path}"
|
||||||
|
|
||||||
|
set-option -g pane-active-border-style fg=black,bg=cyan
|
||||||
|
|
||||||
|
set-option -g status-style fg=black,bg=cyan
|
43
files/zshrc
Normal file
43
files/zshrc
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
# Aliases
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
alias ll='ls -lah --color=auto'
|
||||||
|
alias grep='grep --color=auto'
|
||||||
|
export PS2='> '
|
||||||
|
|
||||||
|
# Keep 5000 lines of history within the shell and save it to ~/.zsh_history:
|
||||||
|
HISTSIZE=5000
|
||||||
|
SAVEHIST=5000
|
||||||
|
HISTFILE=~/.zsh_history
|
||||||
|
setopt histignorealldups sharehistory
|
||||||
|
|
||||||
|
# Set the prompt
|
||||||
|
autoload -Uz promptinit
|
||||||
|
promptinit
|
||||||
|
prompt eric
|
||||||
|
|
||||||
|
# Use modern completion system
|
||||||
|
autoload -Uz compinit
|
||||||
|
compinit
|
||||||
|
|
||||||
|
# zplug - manage plugins
|
||||||
|
source /usr/share/zplug/init.zsh
|
||||||
|
zplug "plugins/git", from:oh-my-zsh
|
||||||
|
zplug "plugins/sudo", from:oh-my-zsh
|
||||||
|
zplug "plugins/command-not-found", from:oh-my-zsh
|
||||||
|
zplug "zsh-users/zsh-syntax-highlighting"
|
||||||
|
zplug "zsh-users/zsh-autosuggestions"
|
||||||
|
zplug "zsh-users/zsh-history-substring-search"
|
||||||
|
zplug "zsh-users/zsh-completions"
|
||||||
|
|
||||||
|
# zplug - install/load new plugins when zsh is started or reloaded
|
||||||
|
if ! zplug check; then
|
||||||
|
printf "Install? [y/N]: "
|
||||||
|
if read -q; then
|
||||||
|
echo; zplug install
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
zplug load
|
||||||
|
|
||||||
|
if [ -x "$(command -v tmux)" ] && [ -n "${DISPLAY}" ] && [ -z "${TMUX}" ]; then
|
||||||
|
exec tmux new-session -A -s ${USER} >/dev/null 2>&1
|
||||||
|
fi
|
2
handlers/main.yml
Normal file
2
handlers/main.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
# handlers file for ericomeehan.ericomeehan
|
52
meta/main.yml
Normal file
52
meta/main.yml
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
galaxy_info:
|
||||||
|
author: your name
|
||||||
|
description: your role description
|
||||||
|
company: your company (optional)
|
||||||
|
|
||||||
|
# If the issue tracker for your role is not on github, uncomment the
|
||||||
|
# next line and provide a value
|
||||||
|
# issue_tracker_url: http://example.com/issue/tracker
|
||||||
|
|
||||||
|
# Choose a valid license ID from https://spdx.org - some suggested licenses:
|
||||||
|
# - BSD-3-Clause (default)
|
||||||
|
# - MIT
|
||||||
|
# - GPL-2.0-or-later
|
||||||
|
# - GPL-3.0-only
|
||||||
|
# - Apache-2.0
|
||||||
|
# - CC-BY-4.0
|
||||||
|
license: license (GPL-2.0-or-later, MIT, etc)
|
||||||
|
|
||||||
|
min_ansible_version: 2.1
|
||||||
|
|
||||||
|
# If this a Container Enabled role, provide the minimum Ansible Container version.
|
||||||
|
# min_ansible_container_version:
|
||||||
|
|
||||||
|
#
|
||||||
|
# Provide a list of supported platforms, and for each platform a list of versions.
|
||||||
|
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
|
||||||
|
# To view available platforms and versions (or releases), visit:
|
||||||
|
# https://galaxy.ansible.com/api/v1/platforms/
|
||||||
|
#
|
||||||
|
# platforms:
|
||||||
|
# - name: Fedora
|
||||||
|
# versions:
|
||||||
|
# - all
|
||||||
|
# - 25
|
||||||
|
# - name: SomePlatform
|
||||||
|
# versions:
|
||||||
|
# - all
|
||||||
|
# - 1.0
|
||||||
|
# - 7
|
||||||
|
# - 99.99
|
||||||
|
|
||||||
|
galaxy_tags: []
|
||||||
|
# List tags for your role here, one per line. A tag is a keyword that describes
|
||||||
|
# and categorizes the role. Users find roles by searching for tags. Be sure to
|
||||||
|
# remove the '[]' above, if you add tags to this list.
|
||||||
|
#
|
||||||
|
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
|
||||||
|
# Maximum 20 tags per role.
|
||||||
|
|
||||||
|
dependencies: []
|
||||||
|
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
|
||||||
|
# if you add dependencies to this list.
|
43
tasks/main.yml
Normal file
43
tasks/main.yml
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
---
|
||||||
|
# tasks file for ericomeehan.ericomeehan
|
||||||
|
- name: Install user environment packages
|
||||||
|
apt:
|
||||||
|
name:
|
||||||
|
- zplug
|
||||||
|
- zsh
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Set default shell to zsh
|
||||||
|
user:
|
||||||
|
name: eric
|
||||||
|
shell: /bin/zsh
|
||||||
|
|
||||||
|
- name: Copy zsh configuration
|
||||||
|
copy:
|
||||||
|
src: zshrc
|
||||||
|
dest: /home/eric/.zshrc
|
||||||
|
|
||||||
|
- name: Install custom zsh prompt
|
||||||
|
copy:
|
||||||
|
src: prompt_eric_setup
|
||||||
|
dest: /usr/share/zsh/functions/Prompts/prompt_eric_setup
|
||||||
|
|
||||||
|
- name: Copy tmux configuration
|
||||||
|
copy:
|
||||||
|
src: tmux.conf
|
||||||
|
dest: /home/eric/.tmux.conf
|
||||||
|
|
||||||
|
- name: Copy git configuration
|
||||||
|
copy:
|
||||||
|
src: gitconfig
|
||||||
|
dest: /home/eric/.gitconfig
|
||||||
|
|
||||||
|
- name: Create local configuration directory
|
||||||
|
file:
|
||||||
|
path: /home/eric/.config/nvim
|
||||||
|
state: directory
|
||||||
|
|
||||||
|
- name: Copy neovim configuration
|
||||||
|
copy:
|
||||||
|
src: init.lua
|
||||||
|
dest: /home/eric/.config/nvim/init.lua
|
2
tasks/mobile-command.yml
Normal file
2
tasks/mobile-command.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
# tasks file for mobile-command.yml
|
2
tests/inventory
Normal file
2
tests/inventory
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
localhost
|
||||||
|
|
5
tests/test.yml
Normal file
5
tests/test.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
- hosts: localhost
|
||||||
|
remote_user: root
|
||||||
|
roles:
|
||||||
|
- ericomeehan.ericomeehan
|
2
vars/main.yml
Normal file
2
vars/main.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
# vars file for ericomeehan.ericomeehan
|
Loading…
Reference in New Issue
Block a user