Add desktop setup role

Assumes a Kubuntu full installation
This commit is contained in:
Salt 2020-02-17 16:15:45 -06:00
parent 9bceb152f2
commit c1d31742a8
6 changed files with 199 additions and 0 deletions

View File

@ -3,4 +3,6 @@
--- ---
- hosts: localhost - hosts: localhost
roles: roles:
- common
- desktop
- localansible - localansible

View File

@ -0,0 +1,2 @@
---
allow_duplicates: no

View File

@ -0,0 +1,119 @@
#!/usr/bin/ansible-playbook
# vim:ft=ansible:
---
- name: Configure desktop system
block:
- name: Create config directories
file:
path: "{{ item }}"
state: directory
recurse: yes
loop:
- "/etc/X11/xorg.conf.d"
- name: Copy system configs
template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
mode: "{{ item.mode }}"
loop:
- { src: "hosts", dest: "/etc/hosts", mode: "0644" }
- { src: "nomouseaccel.conf", dest: "/etc/X11/xorg.conf.d/90-mouse-acceleration.conf", mode: "0644" }
- { src: "g810-led.rules", dest: "/etc/udev/rules.d/50-g810-led.rules", mode: "0644" }
- name: Reload udev
command: /usr/bin/udevadm trigger
- name: Enable i386 architecture
command: /usr/bin/dpkg --add-architecture i386
- name: Add repos
apt_repository:
repo: "{{ item }}"
loop:
- "ppa:lutris-team/lutris"
- name: Update and upgrade apt packages
apt:
upgrade: yes
update_cache: yes
# One day
cache_valid_time: 86400
- name: Install basic packages
apt:
name: "{{ packages }}"
vars:
packages:
- build-essential
- git
- openjdk-8-jre # For Minecraft
- python-pip
- python3-pip
- qt5-default # For Multimc, should be installed on Kubuntu
- vim
- xz-utils # For Ansible deb support
- name: Install fonts and themes
apt:
name: "{{ packages }}"
vars:
packages:
- arc-theme
- fonts-inconsolata
- fonts-noto
- fonts-roboto
- papirus-icon-theme
- name: Install games
apt:
name: "{{ packages }}"
vars:
packages:
- minetest
- name: Install out-of-repo packages
apt:
deb: "{{ item }}"
loop:
- "https://github.com/MultiMC/MultiMC5/releases/download/0.6.8/multimc_1.4-1.deb"
- name: Install applications through APT
apt:
name: "{{ packages }}"
vars:
packages:
- chromium-browser
- firefox
- g810-led
- keepassxc
- lutris
- mesa-vulkan-drivers
- mpc
- mpd
- nextcloud-desktop
- redshift
- rofi
- sonata
- steam-installer
- syncthing-gtk
- telegram-desktop
- vulkan-tools
- vulkan-utils
- winetricks
- "libgl1-mesa-dri:i386"
- "mesa-vulkan-drivers:i386"
- name: Install applications through pip3
pip:
executable: "/usr/bin/pip3"
name: "{{ packages }}"
vars:
packages:
- protontricks
- youtube-dl
- name: Install applications through Snap
snap:
name: "{{ packages }}"
vars:
packages:
- discord
- riot-web
- name: Disable MPD services
systemd:
name: "{{ item }}"
enabled: no
state: stopped
loop:
- mpd.socket
- mpd.service
become: yes

View File

@ -0,0 +1,22 @@
ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c336", MODE="666" RUN+="/usr/bin/g213-led -p /etc/g810-led/profile"
ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c330", MODE="666" RUN+="/usr/bin/g410-led -p /etc/g810-led/profile"
ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c33a", MODE="666" RUN+="/usr/bin/g413-led -p /etc/g810-led/profile"
ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c33c", MODE="666" RUN+="/usr/bin/g513-led -p /etc/g810-led/profile"
ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c333", MODE="666" RUN+="/usr/bin/g610-led -p /etc/g810-led/profile"
ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c338", MODE="666" RUN+="/usr/bin/g610-led -p /etc/g810-led/profile"
ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c331", MODE="666" RUN+="/usr/bin/g810-led -p /etc/g810-led/profile"
ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c337", MODE="666" RUN+="/usr/bin/g810-led -p /etc/g810-led/profile"
ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c32b", MODE="666" RUN+="/usr/bin/g910-led -p /etc/g810-led/profile"
ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c335", MODE="666" RUN+="/usr/bin/g910-led -p /etc/g810-led/profile"
ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c339", MODE="666" RUN+="/usr/bin/gpro-led -p /etc/g810-led/profile"
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c336", MODE="666" RUN+="/usr/bin/g213-led -p /etc/g810-led/profile"
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c330", MODE="666" RUN+="/usr/bin/g410-led -p /etc/g810-led/profile"
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c33a", MODE="666" RUN+="/usr/bin/g413-led -p /etc/g810-led/profile"
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c33c", MODE="666" RUN+="/usr/bin/g513-led -p /etc/g810-led/profile"
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c333", MODE="666" RUN+="/usr/bin/g610-led -p /etc/g810-led/profile"
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c338", MODE="666" RUN+="/usr/bin/g610-led -p /etc/g810-led/profile"
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c331", MODE="666" RUN+="/usr/bin/g810-led -p /etc/g810-led/profile"
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c337", MODE="666" RUN+="/usr/bin/g810-led -p /etc/g810-led/profile"
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c32b", MODE="666" RUN+="/usr/bin/g910-led -p /etc/g810-led/profile"
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c335", MODE="666" RUN+="/usr/bin/g910-led -p /etc/g810-led/profile"
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c339", MODE="666" RUN+="/usr/bin/gpro-led -p /etc/g810-led/profile"

View File

@ -0,0 +1,48 @@
127.0.0.1 localhost
127.0.0.1 {{ ansible_facts['nodename'] }}
# Fuck off, Spotify
0.0.0.0 adclick.g.doublecklick.net
0.0.0.0 adeventtracker.spotify.com
0.0.0.0 ads-fa.spotify.com
0.0.0.0 analytics.spotify.com
0.0.0.0 audio2.spotify.com
0.0.0.0 b.scorecardresearch.com
0.0.0.0 bounceexchange.com
0.0.0.0 bs.serving-sys.com
0.0.0.0 content.bitsontherun.com
0.0.0.0 core.insightexpressai.com
0.0.0.0 crashdump.spotify.com
0.0.0.0 d2gi7ultltnc2u.cloudfront.net
0.0.0.0 d3rt1990lpmkn.cloudfront.net
0.0.0.0 desktop.spotify.com
0.0.0.0 doubleclick.net
0.0.0.0 ds.serving-sys.com
0.0.0.0 googleadservices.com
0.0.0.0 googleads.g.doubleclick.net
0.0.0.0 gtssl2-ocsp.geotrust.com
0.0.0.0 js.moatads.com
0.0.0.0 log.spotify.com
0.0.0.0 media-match.com
0.0.0.0 omaze.com
0.0.0.0 open.spotify.com
0.0.0.0 pagead46.l.doubleclick.net
0.0.0.0 pagead2.googlesyndication.com
0.0.0.0 partner.googleadservices.com
0.0.0.0 pubads.g.doubleclick.net
0.0.0.0 redirector.gvt1.com
0.0.0.0 s0.2mdn.net
0.0.0.0 securepubads.g.doubleclick.net
0.0.0.0 spclient.wg.spotify.com
0.0.0.0 tpc.googlesyndication.com
0.0.0.0 v.jwpcdn.com
0.0.0.0 video-ad-stats.googlesyndication.com
0.0.0.0 weblb-wg.gslb.spotify.com
0.0.0.0 www.googleadservices.com
0.0.0.0 www.googletagservices.com
0.0.0.0 www.omaze.com
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "mouse"
MatchIsPointer "yes"
Option "AccelProfile" "flat"
Option "AccelSpeed" "-1"
EndSection