Split CLI and GUI setup

This commit is contained in:
Anthony Rose 2019-10-21 09:09:44 +01:00
parent 294e3ef23d
commit 973643cfbc
26 changed files with 208 additions and 91 deletions

13
gui.yml Executable file
View file

@ -0,0 +1,13 @@
#!/usr/bin/env ansible-playbook
---
- name: Setup GUI
hosts: localhost
tasks:
- include_role:
name: distro
- include_role:
name: distro-gui
- include_role:
name: home
- include_role:
name: home-gui

View file

@ -1,6 +1,6 @@
#!/usr/bin/env ansible-playbook #!/usr/bin/env ansible-playbook
--- ---
- name: Setup - name: Setup CLI
hosts: localhost hosts: localhost
tasks: tasks:
- include_role: - include_role:

View file

@ -0,0 +1,27 @@
---
- name: Install Debian GUI packages
become: true
apt:
name: '{{ packages }}'
state: present
force_apt_get: yes
vars:
packages:
- caja-open-terminal
- dconf-cli
- desktop-base
- emacs
- evolution
- galculator
- git-gui
- mpv
- nextcloud-desktop
- redshift-gtk
- remmina
- rxvt-unicode
- seahorse
- task-british-desktop
- task-mate-desktop
- vim-gtk
- xinput
- xterm

View file

@ -0,0 +1,46 @@
---
- name: Install FreeBSD core GUI packages
become: true
pkgng:
name: drm-kmod mate xdm xorg xterm
state: present
- name: Install FreeBSD additional GUI packages
become: true
pkgng:
name: '{{ packages }}'
state: present
vars:
packages:
- dbus
- emacs
- en_GB-libreoffice
- firefox-esr
- galculator
- git-gui
- iosevka
- libreoffice
- mpv
- nextcloudclient
- redshift
- remmina
- remmina-plugin-rdp
- rxvt-unicode
- seahorse
- xinput
- name: Start DBUS service
become: true
service:
name: dbus
state: started
enabled: yes
- name: Enable XDM
become: true
lineinfile:
path: /etc/ttys
regexp: '^ttyv8\s.*'
line: 'ttyv8 "/usr/local/bin/xdm -nodaemon" xterm on secure'
- name: Set xorg keyboard layout
become: true
copy:
src: keyboard-gb.conf
dest: /usr/local/etc/X11/xorg.conf.d/keyboard-gb.conf

View file

@ -0,0 +1,5 @@
---
- include: debian.yml
when: ansible_distribution == 'Debian'
- include: freebsd.yml
when: ansible_distribution == 'FreeBSD'

View file

@ -1,5 +1,5 @@
--- ---
- name: Install Debian packages - name: Install Debian CLI packages
become: true become: true
apt: apt:
name: '{{ packages }}' name: '{{ packages }}'
@ -11,39 +11,22 @@
- ansible - ansible
- asciidoctor - asciidoctor
- build-essential - build-essential
- caja-open-terminal
- dc - dc
- dconf-cli
- desktop-base
- devscripts - devscripts
- dnsutils - dnsutils
- emacs
- evolution
- galculator
- git - git
- git-gui
- gnupg - gnupg
- mc - mc
- mpv
- nextcloud-desktop
- nmap - nmap
- openssh-server - openssh-server
- packagekit - packagekit
- python3 - python3
- python3-psutil - python3-psutil
- realmd - realmd
- redshift-gtk
- remmina
- rxvt-unicode
- seahorse
- sqlite3 - sqlite3
- sssd - sssd
- sudo - sudo
- task-british-desktop
- task-mate-desktop
- tlp - tlp
- tmux - tmux
- vim-gtk - vim
- xinput
- xterm
- zsh - zsh

View file

@ -1,61 +1,28 @@
--- ---
- name: Install FreeBSD core packages - name: Install FreeBSD core CLI packages
become: true become: true
pkgng: pkgng:
name: drm-kmod en-freebsd-doc git mate pkg py36-ansible sudo xdm xorg xterm name: en-freebsd-doc git pkg py36-ansible sudo
state: present state: present
- name: Install FreeBSD additional packages - name: Install FreeBSD additional CLI packages
become: true become: true
pkgng: pkgng:
name: '{{ packages }}' name: '{{ packages }}'
state: present state: present
vars: vars:
packages: packages:
- dbus
- emacs
- en_GB-libreoffice
- firefox-esr
- fusefs-ntfs - fusefs-ntfs
- galculator
- git-gui
- gnu-watch - gnu-watch
- gnupg - gnupg
- iosevka
- libreoffice
- mc - mc
- mpv
- nextcloudclient
- nmap - nmap
- openvpn - openvpn
- py36-psutil - py36-psutil
- redshift
- remmina
- remmina-plugin-rdp
- rubygem-asciidoctor - rubygem-asciidoctor
- rxvt-unicode
- seahorse
- sqlite3 - sqlite3
- tmux - tmux
- vim - vim
- xinput
- zsh - zsh
- name: Start DBUS service
become: true
service:
name: dbus
state: started
enabled: yes
- name: Enable XDM
become: true
lineinfile:
path: /etc/ttys
regexp: '^ttyv8\s.*'
line: 'ttyv8 "/usr/local/bin/xdm -nodaemon" xterm on secure'
- name: Set xorg keyboard layout
become: true
copy:
src: keyboard-gb.conf
dest: /usr/local/etc/X11/xorg.conf.d/keyboard-gb.conf
- name: Disable core dumps - name: Disable core dumps
become: true become: true
sysctl: sysctl:

View file

@ -0,0 +1,67 @@
*color: true
URxvt*background: #111111
URxvt*color0: #1e1e1e
URxvt*color1: #cc0000
URxvt*color2: #4e9a06
URxvt*color3: #c4a000
URxvt*color4: #3465a4
URxvt*color5: #75507b
URxvt*color6: #0b939b
URxvt*color7: #d3d7cf
URxvt*color8: #555753
URxvt*color9: #ef2929
URxvt*color10: #8ae234
URxvt*color11: #fce94f
URxvt*color12: #729fcf
URxvt*color13: #ad7fa8
URxvt*color14: #00f5e9
URxvt*color15: #eeeeec
URxvt*font: xft:Monospace:Regular:size=10
URxvt*foreground: #c0c0c0
URxvt*letterSpace: -1
URxvt*locale: true
URxvt*metaSendsEscape: true
URxvt*perl-ext: -searchable-scrollback
URxvt*scrollBar_right: true
URxvt*termName: rxvt-unicode
XClock*hourColor: black
XClock*majorColor: red
XClock*minorColor: black
XClock*minuteColor: black
XClock*render: true
XClock*secondColor: red
XClock*update: 1
Xft.hintstyle: hintfull
Xft.rgba: none
xterm*background: #111111
xterm*color0: #1e1e1e
xterm*color1: #cc0000
xterm*color2: #4e9a06
xterm*color3: #c4a000
xterm*color4: #3465a4
xterm*color5: #75507b
xterm*color6: #0b939b
xterm*color7: #d3d7cf
xterm*color8: #555753
xterm*color9: #ef2929
xterm*color10: #8ae234
xterm*color11: #fce94f
xterm*color12: #729fcf
xterm*color13: #ad7fa8
xterm*color14: #00f5e9
xterm*color15: #eeeeec
xterm*faceName: xft:Monospace:Regular:size=10
xterm*faceSize1: 4
xterm*faceSize2: 6
xterm*faceSize3: 8
xterm*faceSize4: 12
xterm*faceSize5: 14
xterm*faceSize6: 16
xterm*faceSize: 9
xterm*foreground: #c0c0c0
xterm*locale: true
xterm*metaSendsEscape: true
xterm*scrollBar: true
xterm*utf8: always
xterm*utf8Fonts: always
xterm*utf8Title: true

View file

@ -0,0 +1,3 @@
if [ -r $HOME/.shrc ]; then
. $HOME/.shrc
fi

View file

@ -0,0 +1,9 @@
---
- name: Create user applications directory
file:
path: "{{ ansible_env.HOME }}/.local/share/applications"
state: directory
- name: Create user autostart directory
file:
path: "{{ ansible_env.HOME }}/.config/autostart"
state: directory

View file

@ -0,0 +1,25 @@
---
- name: Copy .Xresources
copy:
src: Xresources
dest: "{{ ansible_env.HOME }}/.Xresources"
- name: Copy .fonts.conf
copy:
src: fonts.conf
dest: "{{ ansible_env.HOME }}/.fonts.conf"
- name: Copy redshift.conf
copy:
src: redshift.conf
dest: "{{ ansible_env.HOME }}/.config/redshift.conf"
- name: Auto start nextcloud
copy:
src: nextcloud.desktop
dest: "{{ ansible_env.HOME }}/.config/autostart/nextcloud.desktop"
- name: Auto start redshift-gtk
copy:
src: redshift-gtk.desktop
dest: "{{ ansible_env.HOME }}/.config/autostart/redshift-gtk.desktop"
- name: Auto start remmina-applet
copy:
src: remmina-applet.desktop
dest: "{{ ansible_env.HOME }}/.config/autostart/remmina-applet.desktop"

View file

@ -0,0 +1,7 @@
---
- include: dirs.yml
- include: dotfiles.yml
- include: emacs.yml
- include: firefox.yml
- include: mate.yml

View file

@ -11,14 +11,6 @@
file: file:
path: "{{ ansible_env.HOME }}/.config/systemd/user" path: "{{ ansible_env.HOME }}/.config/systemd/user"
state: directory state: directory
- name: Create user applications directory
file:
path: "{{ ansible_env.HOME }}/.local/share/applications"
state: directory
- name: Create user autostart directory
file:
path: "{{ ansible_env.HOME }}/.config/autostart"
state: directory
- name: Create ~/.ssh directory - name: Create ~/.ssh directory
file: file:
path: "{{ ansible_env.HOME }}/.ssh" path: "{{ ansible_env.HOME }}/.ssh"

View file

@ -1,12 +1,4 @@
--- ---
- name: Copy .Xresources
copy:
src: Xresources
dest: "{{ ansible_env.HOME }}/.Xresources"
- name: Copy .fonts.conf
copy:
src: fonts.conf
dest: "{{ ansible_env.HOME }}/.fonts.conf"
- name: Copy .gitconfig - name: Copy .gitconfig
copy: copy:
src: gitconfig src: gitconfig
@ -27,19 +19,3 @@
copy: copy:
src: openpgp.asc src: openpgp.asc
dest: "{{ ansible_env.HOME }}/.config/openpgp.asc" dest: "{{ ansible_env.HOME }}/.config/openpgp.asc"
- name: Copy redshift.conf
copy:
src: redshift.conf
dest: "{{ ansible_env.HOME }}/.config/redshift.conf"
- name: Auto start nextcloud
copy:
src: nextcloud.desktop
dest: "{{ ansible_env.HOME }}/.config/autostart/nextcloud.desktop"
- name: Auto start redshift-gtk
copy:
src: redshift-gtk.desktop
dest: "{{ ansible_env.HOME }}/.config/autostart/redshift-gtk.desktop"
- name: Auto start remmina-applet
copy:
src: remmina-applet.desktop
dest: "{{ ansible_env.HOME }}/.config/autostart/remmina-applet.desktop"

View file

@ -2,9 +2,6 @@
- include: dirs.yml - include: dirs.yml
- include: dotfiles.yml - include: dotfiles.yml
- include: emacs.yml
- include: firefox.yml
- include: mate.yml
- include: shell.yml - include: shell.yml
- include: vim.yml - include: vim.yml
- include: ssh-authorized-keys.yml - include: ssh-authorized-keys.yml