aboutsummaryrefslogtreecommitdiffstats
path: root/roles/workstation/tasks/os_archlinux.yml
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2021-12-04 14:01:47 +0000
committerRomain Gonçalves <me@rgoncalves.se>2021-12-05 09:33:30 +0000
commit5c2e3443bedf0ef6a34888ea30361af7da314748 (patch)
treee792d59b44ef63981ccddbe39256a5f859df1f79 /roles/workstation/tasks/os_archlinux.yml
parentedf06330b130c6499cf5166d63a3d106555df513 (diff)
downloadrules-5c2e3443bedf0ef6a34888ea30361af7da314748.tar.gz
roles: Add workstation role
Diffstat (limited to 'roles/workstation/tasks/os_archlinux.yml')
-rw-r--r--roles/workstation/tasks/os_archlinux.yml35
1 files changed, 35 insertions, 0 deletions
diff --git a/roles/workstation/tasks/os_archlinux.yml b/roles/workstation/tasks/os_archlinux.yml
new file mode 100644
index 0000000..40b264b
--- /dev/null
+++ b/roles/workstation/tasks/os_archlinux.yml
@@ -0,0 +1,35 @@
+- name: append current user to system groups
+ user:
+ name: "{{ workstation_user }}"
+ groups: "{{ item }}"
+ append: true
+ loop:
+ - docker
+ - wheel
+ - video
+ - audio
+
+- name: enable and start pipewire
+ systemd:
+ name: "{{ item }}"
+ scope: user
+ enabled: true
+ state: started
+ become: true
+ become_method: su
+ become_user: "{{ workstation_user }}"
+ loop:
+ - pipewire
+ - pipewire-pulse
+ - pipewire-media-session
+ when: ansible_service_mgr == "systemd"
+
+- name: ensure that dhcpcd is started
+ service:
+ name: dhcpcd
+ state: started
+ enabled: true
+
+- name: enable battery optimization
+ include_tasks: tlp.yml
+ when: ansible_form_factor in ["Laptop", "Notebook"]
remember that computers suck.