aboutsummaryrefslogtreecommitdiffstats
path: root/roles/linux_desktop/tasks/main.yml
blob: 5fbb799dfc7cf5fa823cb4966e8d6c0b9866fe6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
- name: install packages
  dnf:
    name: '{{ linux_desktop_packages }}'
    exclude: '{{ linux_desktop_excluded_packages }}'
    state: present

- name: enable GuC for intel card
  copy:
    content: |
      options i915 enable_guc=2 enable_fbc=1
    dest: /etc/modprobe.d/i915.conf
  register: i915_options

- name: warn if reboot needed
  fail:
    msg: A reboot is needed to apply settings to i915 graphics module.
  when: i915_options.changed
  ignore_errors: yes

- name: set default target to graphical
  file:
    src: /usr/lib/systemd/system/graphical.target
    dest: /etc/systemd/system/default.target
    state: link

- name: set sddm to use x11
  ini_file:
    path: /etc/sddm.conf
    section: General
    option: DisplayServer
    value: x11
  notify: restart sddm

- name: enable sddm
  systemd:
    name: sddm
    enabled: yes
    state: started

- name: add flathub flatpak repository
  flatpak_remote:
    name: '{{ item.name }}'
    flatpakrepo_url: '{{ item.url }}'
    state: present
  loop: '{{ linux_desktop_flathub_repos }}'

- name: install flatpak applications
  flatpak:
    name: '{{ item if item is string else item.name }}'
    remote: "{{ 'flathub' if item is string or item.remote is not defined else item.remote }}"
    state: present
  loop: '{{ linux_desktop_flatpaks }}'

- name: set up flatpak-update timer
  include_role:
    name: systemd_timer
  vars:
    timer_name: flatpak-update
    timer_description: Update flatpaks
    timer_after: network.target
    timer_on_calendar: '{{ linux_desktop_flatpak_update_on_calendar }}'
    timer_exec: flatpak update -y

- name: configure flatpak overrides
  command: flatpak override {{ item.key }} {{ item.value }}
  changed_when: no
  loop: '{{ linux_desktop_flatpak_overrides | dict2items }}'

- name: enable kde user switching
  ini_file:
    path: /etc/xdg/kdeglobals
    section: KDE Action Restrictions
    option: '{{ item }}'
    value: 'true'
  loop:
    - action/start_new_session
    - action/switch_user

- name: fix notification sound in GTK apps
  replace:
    path: /usr/share/xdg-desktop-portal/portals/kde.portal
    regexp: org\.freedesktop\.impl\.portal\.Notification;
    replace: ''

- import_tasks: gajim.yml
  tags: gajim

- import_tasks: freeipa.yml
  tags: freeipa