1
0
Fork 0
mirror of https://github.com/eoli3n/dotfiles synced 2024-05-12 18:46:05 +02:00
eoli3n-dotfiles/README.md

194 lines
4.3 KiB
Markdown
Raw Normal View History

2017-12-23 22:44:23 +01:00
# i3-gaps Acid Dark
2016-03-29 20:44:38 +02:00
2017-12-27 16:00:38 +01:00
| | |
|-----------|:-------------:|
2017-12-27 16:00:38 +01:00
| Master | [![Build Status](https://travis-ci.org/eoli3n/dotfiles.svg?branch=master)](https://travis-ci.org/eoli3n/dotfiles) |
| Dev | [![Build Status](https://travis-ci.org/eoli3n/dotfiles.svg?branch=dev)](https://travis-ci.org/eoli3n/dotfiles) |
2017-12-26 01:15:08 +01:00
2017-12-22 13:25:54 +01:00
**i3-gaps zsh pureprompt polybar**
![alt tag](https://github.com/eoli3n/dotfiles/blob/master/screenshots/i3gaps.png)
**Weechat**
![alt tag](https://github.com/eoli3n/dotfiles/blob/master/screenshots/weechat.png)
**Chrome Rofi Stylish**
2016-09-17 18:35:54 +02:00
2017-12-22 13:25:54 +01:00
![alt tag](https://github.com/eoli3n/dotfiles/blob/master/screenshots/chrome-rofi.png)
**Connman GTK Theme**
![alt tag](https://github.com/eoli3n/dotfiles/blob/master/screenshots/connman-gtk.png)
2017-12-23 22:44:23 +01:00
2019-12-01 16:29:03 +01:00
## Why using Ansible ?
Ansible allows to duplicate this Desktop Environment over multiple hosts with specific configuration (dualscreen, packages...).
2019-12-01 16:29:03 +01:00
All your nodes will have access to all configurations if
- your git repo is accessible from every nodes
- your current node ssh keys is authorized on all nodes
2017-12-29 02:55:10 +01:00
2019-12-01 16:29:03 +01:00
You should be able to edit and push from/to any managed hosts.
2016-12-27 20:05:23 +01:00
2019-12-01 16:29:03 +01:00
## Test VMs|Containers
Please check ``vagrant/*/README.md`` and ``docker/*/README.md``
## How to
2017-12-29 03:00:53 +01:00
2019-12-01 16:29:03 +01:00
** Use carefully** backup your home before using ! Ansible will backup any existing conf file before overriding.
2019-12-01 16:32:57 +01:00
### 1° Fork Me!
2019-12-01 16:29:03 +01:00
2019-12-01 16:32:57 +01:00
### 2° Clone your repo on a personnal host
2017-12-29 02:55:10 +01:00
```
2019-12-01 16:29:03 +01:00
git clone --recursive https://github.com/[your_repo]/dotfiles
2017-12-29 02:55:10 +01:00
cd dotfiles
```
2019-12-01 16:32:57 +01:00
### 3° Generate ssh keys
2019-12-01 16:29:03 +01:00
```
ssh-keygen -t rsa
```
2019-12-01 16:32:57 +01:00
### 4° Replace your ssh key in ``authorized_keys`` role
2019-12-01 16:29:03 +01:00
**!!! Use as is, you will add my SSH key in your authorized_keys !!!**
```
cp ~/.ssh/id_rsa.pub dotfiles/roles/authorized_keys/id_rsa.pub
```
2019-12-01 16:32:57 +01:00
### 5° Generate hosts file with your managed hosts
2019-12-01 16:29:03 +01:00
``hosts`` file is defaultly gitignored.
```
cd dotfiles
mv hosts.template hosts
```
Add your hosts in right sections
- server : install only cli tools
- desktop : install graphic environment
- laptop: install desktop + some extra packages
2017-12-29 02:55:10 +01:00
2019-12-01 16:29:03 +01:00
Please explicitly define an ``ansible_user`` which will receive configurations
```
[server]
server1 ansible_user=root
[laptop]
host1 ansible_user=user
[desktop]
host2 ansible_user=user2
```
Remove useless groups and hosts
2019-12-01 16:32:57 +01:00
### 6° Copy your SSH keys on all nodes : node per node if password differ between users
2019-12-01 16:29:03 +01:00
It add your public ssh keys on hosts
```
ansible-playbook install.yml -t init_ssh -l host1 -K
ansible-playbook install.yml -t init_ssh -l host2 -K
ansible-playbook install.yml -t init_ssh -l host3 -K
```
2019-12-01 16:32:57 +01:00
### 7° Run ansible-playbook
2019-12-01 16:29:03 +01:00
For runs on hosts configured with root user
You can use without providing extra passwords
```
ansible-playbook install.yml -l server
```
For hosts configured with non-root user
User needs to be in sudoers.
You need to use -K to ask sudo password, and -l <host> to limit to that host
```
ansible-playbook install.yml -l host1 -K
```
2019-12-01 16:32:57 +01:00
### Extra commands
2019-12-01 16:29:03 +01:00
To list tasks and tags
```
ansible-playbook install.yml --list-tasks
```
To limit to a tag
```
ansible-playbook install.yml -K -t <tag>
```
To dry-run and print files diff on all declared hosts
```
ansible-playbook install.yml -l host1 -CDK
```
2019-12-01 16:32:57 +01:00
### Local run
2019-12-01 16:29:03 +01:00
Add localhost line and user in right hosts file section
```
[server]
[laptop]
localhost ansible_connection=local ansible_user=user
[desktop]
```
2019-12-01 16:32:57 +01:00
```
2019-12-01 16:29:03 +01:00
ansible-playbook install.yml -l localhost -K
```
Please look at ``roles/*/README.md`` if exists for specific hosts configuration.
2017-12-20 02:15:03 +01:00
2017-12-23 22:44:23 +01:00
## Desktop/Laptop Environment
2017-12-22 13:25:54 +01:00
2019-12-01 16:29:03 +01:00
Should not be used as ``root``.
2017-12-29 03:06:47 +01:00
2017-12-23 22:44:23 +01:00
### Supported OS
2017-12-23 22:24:17 +01:00
- Archlinux
2017-12-22 13:25:54 +01:00
### Dependencies
2017-01-09 22:42:58 +01:00
2017-12-23 22:44:23 +01:00
- ansible >= 2.4
2017-01-09 22:42:58 +01:00
2017-12-23 22:44:23 +01:00
### Role list
2017-12-29 12:38:06 +01:00
- packages-common
2019-12-01 16:29:03 +01:00
- fish
- neovim
- terminfo
2017-12-23 22:44:23 +01:00
- screen
- authorized_keys
2017-12-29 12:38:06 +01:00
- packages-desktop
2017-12-23 22:44:23 +01:00
- gtk
- i3-wm
2019-12-01 16:29:03 +01:00
- picom
2017-12-23 22:44:23 +01:00
- polybar
2019-12-01 16:29:03 +01:00
- variety
2017-12-23 22:44:23 +01:00
- rofi
2019-12-01 16:29:03 +01:00
- neofetch
2017-12-23 22:44:23 +01:00
- termite
- weechat
2019-12-01 16:29:03 +01:00
- ssh-agent
- dpms
2017-12-23 22:44:23 +01:00
- packages-laptop [only laptop tag]
- xbindkeys [only laptop tag]
## Server Environment
2017-12-19 19:40:08 +01:00
2019-12-01 16:29:03 +01:00
Only cli tools
It could be run as ``root``.
2017-12-23 22:44:23 +01:00
### Supported OS
2017-12-19 19:40:08 +01:00
2017-12-22 13:25:54 +01:00
- Archlinux
2017-12-22 21:06:46 +01:00
- Debian
2017-12-22 17:47:29 +01:00
- Centos
2017-12-22 14:20:42 +01:00
- FreeBSD : need to ``sudo ln -s /usr/local/bin/python2 /usr/bin/python``
2017-12-19 19:40:08 +01:00
2017-12-23 22:44:23 +01:00
### Dependencies
- ansible >= 2.4
### Role list
2017-12-29 12:38:06 +01:00
- packages-common
2019-12-01 16:29:03 +01:00
- fish
- neovim
2017-12-23 22:44:23 +01:00
- terminfo
2019-12-01 16:29:03 +01:00
- screen
- authorized_keys
2017-12-23 22:44:23 +01:00
2019-12-01 16:32:57 +01:00
## Previously
2017-01-15 12:55:50 +01:00
* [i3-gaps Dark Solarized](https://github.com/eoli3n/dotfiles/tree/zsh-agnoster-solarized)
2017-01-10 18:25:08 +01:00
**IRC**
eoli3n @ freenode #archlinux-fr