aboutsummaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorEmil Renner Berthing <esmil@labitat.dk>2018-09-30 20:44:44 +0200
committerEmil Renner Berthing <esmil@labitat.dk>2018-09-30 21:30:53 +0200
commit6ff123525e8a3f44028a2fcee9cf30e9e7792052 (patch)
tree43413ddff35fd5ae1f70a1a890de04da24c6e2d1 /roles
parenta39fb817e87d053f82e06305b4a737d40c483ee3 (diff)
downloadlabitat-ansible-6ff123525e8a3f44028a2fcee9cf30e9e7792052.tar.gz
labitat-ansible-6ff123525e8a3f44028a2fcee9cf30e9e7792052.tar.xz
labitat-ansible-6ff123525e8a3f44028a2fcee9cf30e9e7792052.zip
users: esmil: add some dotfiles
Diffstat (limited to 'roles')
-rw-r--r--roles/users/files/esmil/bash_profile5
-rw-r--r--roles/users/files/esmil/bashrc35
-rw-r--r--roles/users/files/esmil/bashrc_root40
-rw-r--r--roles/users/files/esmil/gitconfig24
-rw-r--r--roles/users/tasks/esmil.yml13
5 files changed, 117 insertions, 0 deletions
diff --git a/roles/users/files/esmil/bash_profile b/roles/users/files/esmil/bash_profile
new file mode 100644
index 0000000..fb7327e
--- /dev/null
+++ b/roles/users/files/esmil/bash_profile
@@ -0,0 +1,5 @@
+export LANG=da_DK.UTF-8
+export LC_COLLATE=C
+export LC_MESSAGES=C
+
+. "$HOME/.bashrc"
diff --git a/roles/users/files/esmil/bashrc b/roles/users/files/esmil/bashrc
new file mode 100644
index 0000000..39a2c53
--- /dev/null
+++ b/roles/users/files/esmil/bashrc
@@ -0,0 +1,35 @@
+# if not running interactively, don't do anything
+[[ $- != *i* ]] && return
+
+export PS1='\[\e[1;32m\]\u\[\e[00m\]@\[\e[0;32m\]\h\[\e[1;34m\]\w\[\e[00m\]\$ '
+unset PROMPT_COMMAND
+export -n PROMPT_COMMAND
+
+# directory listing
+if type dircolors > /dev/null 2>&1; then
+ eval "$(dircolors -b)"
+fi
+alias ls='ls --color=auto -F'
+alias ll='ls -Ahl'
+
+# some more alias to avoid making mistakes:
+alias rm='rm -ri'
+alias cp='cp -rid'
+alias mv='mv -i'
+
+# editor
+export EDITOR='vim'
+alias vi='vim'
+
+# pager
+export PAGER='less'
+export LESS='-FRXS'
+
+# systemd
+alias start='systemctl --user start'
+alias stop='systemctl --user stop'
+alias restart='systemctl --user restart'
+alias status='systemctl --user status'
+
+stty -ixon
+cd
diff --git a/roles/users/files/esmil/bashrc_root b/roles/users/files/esmil/bashrc_root
new file mode 100644
index 0000000..354ff57
--- /dev/null
+++ b/roles/users/files/esmil/bashrc_root
@@ -0,0 +1,40 @@
+# if not running interactively, don't do anything
+[[ $- != *i* ]] && return
+
+export PS1='\[\e[1;31m\]\u\[\e[00m\]@\[\e[0;31m\]\h\[\e[1;34m\]\w\[\e[00m\]\$ '
+unset PROMPT_COMMAND
+export -n PROMPT_COMMAND
+
+# directory listing
+if type dircolors > /dev/null 2>&1; then
+ eval "$(dircolors -b)"
+fi
+alias ls='ls --color=auto -F'
+alias ll='ls -Ahl'
+
+# some more alias to avoid making mistakes:
+alias rm='rm -ri'
+alias cp='cp -rid'
+alias mv='mv -i'
+
+# editor
+export EDITOR='vim'
+alias vi='vim'
+
+# pager
+export PAGER='less'
+export LESS='-FRXS'
+
+# network
+alias ip6='ip -6'
+
+# systemd
+alias start='systemctl start'
+alias stop='systemctl stop'
+alias restart='systemctl restart'
+alias status='systemctl status'
+alias cgls='systemd-cgls'
+alias cgtop='systemd-cgtop'
+
+stty -ixon
+cd
diff --git a/roles/users/files/esmil/gitconfig b/roles/users/files/esmil/gitconfig
new file mode 100644
index 0000000..40816d5
--- /dev/null
+++ b/roles/users/files/esmil/gitconfig
@@ -0,0 +1,24 @@
+[user]
+ name = Emil Renner Berthing
+ email = esmil@mailme.dk
+[color]
+ ui = auto
+[apply]
+ whitespace = warn
+[alias]
+ cdiff = diff --cached
+ co = checkout
+ cp = cherry-pick
+ st = status
+ lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
+ graph = log --all --graph --decorate --oneline --abbrev-commit
+[core]
+ editor = vim
+[log]
+ decorate = true
+[push]
+ default = upstream
+[rebase]
+ autoSquash = true
+[clean]
+ requireForce = false
diff --git a/roles/users/tasks/esmil.yml b/roles/users/tasks/esmil.yml
index b1555da..af74934 100644
--- a/roles/users/tasks/esmil.yml
+++ b/roles/users/tasks/esmil.yml
@@ -14,4 +14,17 @@
user: esmil
key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEUS/4G4YgI7LeJll8BUHCcdkCK3klSxzhqEY3X2df5+ esmil@stitch'
+- name: esmil - copy dotfiles
+ copy:
+ dest: '~esmil/.{{ item }}'
+ src: 'esmil/{{ item }}'
+ owner: esmil
+ group: users
+ mode: 0644
+ with_items:
+ - bash_profile
+ - bashrc
+ - bashrc_root
+ - gitconfig
+
# vim: set ts=2 sw=2 et: