Add more config files to the base role.

This commit is contained in:
Tom Alexander 2022-10-27 00:07:06 -04:00
parent b8658ad1dc
commit 2e0a6073c8
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
10 changed files with 85 additions and 0 deletions

View File

@ -0,0 +1 @@
timezone: "America/New_York"

View File

@ -31,3 +31,4 @@ users:
- main_fido
- backup_fido
- homeassistant
gitconfig: gitconfig_home

View File

@ -21,3 +21,4 @@ graphics_driver: "intel"
build_user:
name: talexander
group: talexander
gitconfig: gitconfig_home

View File

@ -0,0 +1,11 @@
#!/usr/bin/env bash
#
# List git remote branches by owner
#git for-each-ref --format='%(committerdate) %09 %(authorname) %09 %(refname)' | sort -k5n -k2M -k3n -k4n
# git fetch --all --prune
# git for-each-ref --format='%(committerdate:relative) %09 %(authorname) %09 %(refname)' --sort='committerdate' | grep 'Tom Alexander'
git ls-remote --heads origin | awk '{print $1}' | while read hash; do
PAGER='' git log -n1 --pretty=format:'%Cgreen%<(20)%cr%Creset %C(bold blue)%<(20)%an%Creset %C(yellow)%d%Creset %n' "$hash"
done

View File

@ -0,0 +1,15 @@
[user]
email = tom@fizz.buzz
name = Tom Alexander
signingkey = D3A179C9A53C0EDE
[push]
default = simple
[alias]
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
bh = log --oneline --branches=* --remotes=* --graph --decorate
[core]
excludesfile = /home/talexander/.gitignore_global
[commit]
gpgsign = true
[pull]
rebase = true

View File

@ -0,0 +1,2 @@
.idea
.python-version

View File

View File

@ -0,0 +1,8 @@
set-option -g mouse on
set-option -g history-limit 20000
# set -g @plugin 'tmux-plugins/tmux-yank'
# Emacs style
# bind-key -T copy-mode y send-key -X copy-pipe-and-cancel "xsel -i -p && xsel -o -p | xsel -i -b"
# bind-key -T copy-mode y send-key -X copy-pipe "xsel -i -p && xsel -o -p | xsel -i -b"
# bind-key C-y run "xsel -o | tmux load-buffer - ; tmux paste-buffer"
# unbind -T copy-mode MouseDragEnd1Pane

View File

@ -104,3 +104,22 @@
src: tmpfs
fstype: tmpfs
opts: rw,mode=777
- name: Set timezone
file:
src: "/usr/share/zoneinfo/{{ timezone|default('UTC') }}"
dest: /etc/localtime
owner: root
group: wheel
state: link
- name: Install scripts
copy:
src: "files/{{ item.src }}"
dest: "{{ item.dest }}"
mode: 0755
owner: root
group: wheel
loop:
- src: git_branches_by_owner_time
dest: /usr/local/bin/git_branches_by_owner_time

View File

@ -1,6 +1,33 @@
- include_role:
name: per_user
- name: Configure gitconfig
copy:
src: "files/{{ item.src }}"
dest: "{{ account_homedir.stdout }}/{{ item.dest }}"
mode: 0600
owner: "{{ account_name.stdout }}"
group: "{{ group_name.stdout }}"
when: gitconfig is defined
loop:
- src: "{{ gitconfig }}"
dest: .gitconfig
- name: Copy files
copy:
src: "files/{{ item.src }}"
dest: "{{ account_homedir.stdout }}/{{ item.dest }}"
mode: 0600
owner: "{{ account_name.stdout }}"
group: "{{ group_name.stdout }}"
loop:
- src: ignore
dest: .ignore
- src: tmux.conf
dest: .tmux.conf
- src: gitignore_global
dest: .gitignore_global
- import_tasks: tasks/peruser_freebsd.yaml
when: 'os_flavor == "freebsd"'