mirror of
https://github.com/fscotto/infra.git
synced 2026-05-30 15:39:58 +00:00
Add layered Bash editor environment snippets
This commit is contained in:
@@ -41,6 +41,10 @@ common_dotfiles:
|
||||
src: .bash_profile
|
||||
dest: .bash_profile
|
||||
mode: "0644"
|
||||
- name: .bashrc.aliases
|
||||
src: .bashrc.aliases
|
||||
dest: .bashrc.aliases
|
||||
mode: "0644"
|
||||
- name: .vimrc
|
||||
src: .vimrc
|
||||
dest: .vimrc
|
||||
|
||||
@@ -157,6 +157,10 @@ desktop_common_dotfiles:
|
||||
src: .config/opencode/
|
||||
dest: .config/opencode/
|
||||
mode: preserve
|
||||
- name: Bash profile fragments
|
||||
src: .bashrc.d/
|
||||
dest: .bashrc.d/
|
||||
mode: preserve
|
||||
- name: .gitignore_global
|
||||
src: .gitignore_global
|
||||
dest: .gitignore_global
|
||||
|
||||
@@ -22,3 +22,8 @@ ubuntu_docker_packages:
|
||||
enabled_services:
|
||||
- ufw
|
||||
- docker
|
||||
|
||||
ubuntu_dotfiles:
|
||||
- src: .bashrc.d/
|
||||
dest: .bashrc.d/
|
||||
mode: preserve
|
||||
|
||||
@@ -4,6 +4,18 @@
|
||||
ansible.builtin.package_facts:
|
||||
manager: auto
|
||||
|
||||
- name: Copy Ubuntu dotfiles
|
||||
tags: [dotfiles, dotfiles:common]
|
||||
ansible.builtin.copy:
|
||||
src: "{{ playbook_dir }}/../dotfiles/ubuntu/{{ item.src }}"
|
||||
dest: "{{ effective_user_home }}/{{ item.dest }}"
|
||||
owner: "{{ effective_username }}"
|
||||
group: "{{ effective_user_group }}"
|
||||
mode: "{{ item.mode }}"
|
||||
loop: "{{ ubuntu_dotfiles | default([]) }}"
|
||||
loop_control:
|
||||
label: "{{ item.dest }}"
|
||||
|
||||
- name: Ensure architecture is supported for Google Chrome
|
||||
tags: [packages]
|
||||
ansible.builtin.fail:
|
||||
|
||||
@@ -39,6 +39,13 @@ shopt -s cmdhist
|
||||
[ -d "$HOME/bin" ] && PATH="$HOME/bin:$PATH"
|
||||
export PATH
|
||||
|
||||
if [ -d "$HOME/.bashrc.d" ]; then
|
||||
for bashrc_file in "$HOME"/.bashrc.d/*.sh; do
|
||||
[ -r "$bashrc_file" ] || continue
|
||||
. "$bashrc_file"
|
||||
done
|
||||
fi
|
||||
|
||||
# =========================
|
||||
# Aliases (portable)
|
||||
# =========================
|
||||
@@ -420,3 +427,5 @@ elif [ "$PLATFORM" = "linux" ]; then
|
||||
alias df='df -h'
|
||||
alias du='du -h'
|
||||
fi
|
||||
|
||||
[ -r "$HOME/.bashrc.aliases" ] && . "$HOME/.bashrc.aliases"
|
||||
|
||||
2
dotfiles/common/.bashrc.aliases
Normal file
2
dotfiles/common/.bashrc.aliases
Normal file
@@ -0,0 +1,2 @@
|
||||
# Additional Bash aliases.
|
||||
# Keep this file as the extension point for shared aliases.
|
||||
2
dotfiles/desktop/.bashrc.d/20-editor-desktop.sh
Normal file
2
dotfiles/desktop/.bashrc.d/20-editor-desktop.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
export EDITOR=vim
|
||||
export VISUAL=emacs
|
||||
1
dotfiles/ubuntu/.bashrc.d/20-editor-ubuntu.sh
Normal file
1
dotfiles/ubuntu/.bashrc.d/20-editor-ubuntu.sh
Normal file
@@ -0,0 +1 @@
|
||||
export EDITOR=vim
|
||||
Reference in New Issue
Block a user