aboutsummaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorStonewall Jackson <stonewall@sacredheartsc.com>2023-04-18 21:23:22 -0400
committerStonewall Jackson <stonewall@sacredheartsc.com>2023-04-18 21:23:22 -0400
commit2b1725152bd372b1d2ca745da50a66e664e70cdb (patch)
treed83bcfecb12a4027c406f839c6ac5eab8b1431de /roles
parent2170ae7fd8807682b3a0d29876af9f6a9ca71d57 (diff)
downloadselfhosted-2b1725152bd372b1d2ca745da50a66e664e70cdb.tar.gz
selfhosted-2b1725152bd372b1d2ca745da50a66e664e70cdb.zip
linux_desktop: switch to kde
Diffstat (limited to 'roles')
-rw-r--r--roles/linux_desktop/defaults/main.yml9
-rw-r--r--roles/linux_desktop/files/etc/sddm.conf122
-rw-r--r--roles/linux_desktop/files/usr/local/share/thumbnailers/totem.thumbnailer4
-rw-r--r--roles/linux_desktop/tasks/freeipa.yml12
-rw-r--r--roles/linux_desktop/tasks/main.yml53
-rw-r--r--roles/linux_desktop/tasks/theme.yml35
-rw-r--r--roles/linux_desktop/templates/etc/lightdm/lightdm-gtk-greeter.conf.j210
-rw-r--r--roles/linux_desktop/vars/main.yml37
-rw-r--r--roles/local_homedirs/tasks/main.yml27
-rw-r--r--roles/local_homedirs/vars/main.yml2
10 files changed, 144 insertions, 167 deletions
diff --git a/roles/linux_desktop/defaults/main.yml b/roles/linux_desktop/defaults/main.yml
index 33e972b..16f3fd8 100644
--- a/roles/linux_desktop/defaults/main.yml
+++ b/roles/linux_desktop/defaults/main.yml
@@ -1,11 +1,2 @@
linux_desktop_access_group: role-linux-desktop-access
linux_desktop_flatpak_update_on_calendar: daily
-linux_desktop_thumbnail_cache_size: 4096 # MB
-linux_desktop_qogir_version: 2023-02-27
-linux_desktop_qogir_icon_version: 2023-02-23
-
-linux_desktop_lightdm_background: /usr/share/backgrounds/rocky-default-9-onyx-mountains.png
-linux_desktop_lightdm_gtk_theme: Qogir
-linux_desktop_lightdm_icon_theme: Qogir
-linux_desktop_lightdm_cursor_theme: Qogir
-linux_desktop_lightdm_font_name: Liberation Sans 9
diff --git a/roles/linux_desktop/files/etc/sddm.conf b/roles/linux_desktop/files/etc/sddm.conf
new file mode 100644
index 0000000..955fc1d
--- /dev/null
+++ b/roles/linux_desktop/files/etc/sddm.conf
@@ -0,0 +1,122 @@
+[Autologin]
+# Whether sddm should automatically log back into sessions when they exit
+#Relogin=false
+
+# Name of session file for autologin session
+#Session=
+
+# Username for autologin session
+#User=
+
+
+[General]
+# Enable Qt's automatic high-DPI scaling
+#EnableHiDPI=false
+
+# Halt command
+#HaltCommand=/usr/bin/systemctl poweroff
+
+# Initial NumLock state. Can be on, off or none.
+# If property is set to none, numlock won't be changed
+# NOTE: Currently ignored if autologin is enabled.
+#Numlock=none
+
+# Reboot command
+#RebootCommand=/usr/bin/systemctl reboot
+
+# Control x11/wayland startup
+DisplayServer=x11
+
+[Theme]
+# Current theme name
+#Current=01-breeze-fedora
+
+# Cursor theme used in the greeter
+#CursorTheme=
+
+# Number of users to use as threshold
+# above which avatars are disabled
+# unless explicitly enabled with EnableAvatars
+#DisableAvatarsThreshold=7
+
+# Enable display of custom user avatars
+EnableAvatars=false
+
+# Global directory for user avatars
+# The files should be named <username>.face.icon
+#FacesDir=/usr/share/sddm/faces
+
+# Theme directory path
+#ThemeDir=/usr/share/sddm/themes
+
+
+[Users]
+# Default $PATH for logged in users
+#DefaultPath=/usr/local/bin:/usr/bin:/bin
+
+# Comma-separated list of shells.
+# Users with these shells as their default won't be listed
+#HideShells=
+
+# Comma-separated list of users that should not be listed
+#HideUsers=
+
+# Maximum user id for displayed users
+#MaximumUid=60000
+
+# Minimum user id for displayed users
+#MinimumUid=1000
+
+# Remember the session of the last successfully logged in user
+#RememberLastSession=true
+
+# Remember the last successfully logged in user
+#RememberLastUser=true
+
+
+[Wayland]
+# Path to a script to execute when starting the desktop session
+#SessionCommand=/etc/sddm/wayland-session
+
+# Directory containing available Wayland sessions
+#SessionDir=/usr/share/wayland-sessions
+
+# Path to the user session log file
+#SessionLogFile=.cache/wayland-errors
+
+
+[X11]
+# Path to a script to execute when starting the display server
+#DisplayCommand=/etc/sddm/Xsetup
+
+# Path to a script to execute when stopping the display server
+#DisplayStopCommand=/etc/sddm/Xstop
+
+# The lowest virtual terminal number that will be used.
+#MinimumVT=1
+
+# Arguments passed to the X server invocation
+#ServerArguments=-nolisten tcp
+
+# Path to X server binary
+#ServerPath=/usr/bin/X
+
+# Path to a script to execute when starting the desktop session
+#SessionCommand=/etc/X11/xinit/Xsession
+
+# Directory containing available X sessions
+#SessionDir=/usr/share/xsessions
+
+# Path to the user session log file
+#SessionLogFile=.cache/xsession-errors
+
+# Path to the Xauthority file
+#UserAuthFile=.Xauthority
+
+# Path to xauth binary
+#XauthPath=/usr/bin/xauth
+
+# Path to Xephyr binary
+#XephyrPath=/usr/bin/Xephyr
+
+
diff --git a/roles/linux_desktop/files/usr/local/share/thumbnailers/totem.thumbnailer b/roles/linux_desktop/files/usr/local/share/thumbnailers/totem.thumbnailer
deleted file mode 100644
index 26649bd..0000000
--- a/roles/linux_desktop/files/usr/local/share/thumbnailers/totem.thumbnailer
+++ /dev/null
@@ -1,4 +0,0 @@
-[Thumbnailer Entry]
-TryExec=/usr/bin/totem-video-thumbnailer
-Exec=/usr/bin/totem-video-thumbnailer -l -s %s %u %o
-MimeType=application/mxf;application/ram;application/sdp;application/vnd.apple.mpegurl;application/vnd.ms-asf;application/vnd.ms-wpl;application/vnd.rn-realmedia;application/vnd.rn-realmedia-vbr;application/x-extension-m4a;application/x-extension-mp4;application/x-flash-video;application/x-matroska;application/x-netshow-channel;application/x-quicktimeplayer;application/x-shorten;image/vnd.rn-realpix;image/x-pict;misc/ultravox;text/x-google-video-pointer;video/3gp;video/3gpp;video/3gpp2;video/dv;video/divx;video/fli;video/flv;video/mp2t;video/mp4;video/mp4v-es;video/mpeg;video/mpeg-system;video/msvideo;video/ogg;video/quicktime;video/vivo;video/vnd.divx;video/vnd.mpegurl;video/vnd.rn-realvideo;video/vnd.vivo;video/webm;video/x-anim;video/x-avi;video/x-flc;video/x-fli;video/x-flic;video/x-flv;video/x-m4v;video/x-matroska;video/x-mjpeg;video/x-mpeg;video/x-mpeg2;video/x-ms-asf;video/x-ms-asf-plugin;video/x-ms-asx;video/x-msvideo;video/x-ms-wm;video/x-ms-wmv;video/x-ms-wmx;video/x-ms-wvx;video/x-nsv;video/x-ogm+ogg;video/x-theora;video/x-theora+ogg;video/x-totem-stream;audio/x-pn-realaudio;audio/3gpp;audio/3gpp2;audio/aac;audio/ac3;audio/AMR;audio/AMR-WB;audio/basic;audio/dv;audio/eac3;audio/flac;audio/m4a;audio/midi;audio/mp1;audio/mp2;audio/mp3;audio/mp4;audio/mpeg;audio/mpg;audio/ogg;audio/opus;audio/prs.sid;audio/scpls;audio/vnd.rn-realaudio;audio/wav;audio/webm;audio/x-aac;audio/x-aiff;audio/x-ape;audio/x-flac;audio/x-gsm;audio/x-it;audio/x-m4a;audio/x-m4b;audio/x-matroska;audio/x-mod;audio/x-mp1;audio/x-mp2;audio/x-mp3;audio/x-mpg;audio/x-mpeg;audio/x-ms-asf;audio/x-ms-asx;audio/x-ms-wax;audio/x-ms-wma;audio/x-musepack;audio/x-opus+ogg;audio/x-pn-aiff;audio/x-pn-au;audio/x-pn-wav;audio/x-pn-windows-acm;audio/x-realaudio;audio/x-real-audio;audio/x-s3m;audio/x-sbc;audio/x-shorten;audio/x-speex;audio/x-stm;audio/x-tta;audio/x-wav;audio/x-wavpack;audio/x-vorbis;audio/x-vorbis+ogg;audio/x-xm;application/x-flac;
diff --git a/roles/linux_desktop/tasks/freeipa.yml b/roles/linux_desktop/tasks/freeipa.yml
index be7761d..cae5149 100644
--- a/roles/linux_desktop/tasks/freeipa.yml
+++ b/roles/linux_desktop/tasks/freeipa.yml
@@ -1,9 +1,9 @@
-- name: create lightdm HBAC service
+- name: create sddm HBAC service
ipahbacsvc:
ipaadmin_principal: '{{ ipa_user }}'
ipaadmin_password: '{{ ipa_pass }}'
- name: lightdm
- description: LightDM Display Manager
+ name: sddm
+ description: SDDM
state: present
run_once: yes
@@ -31,13 +31,11 @@
ipaadmin_principal: '{{ ipa_user }}'
ipaadmin_password: '{{ ipa_pass }}'
name: allow_gdm_on_linux_desktops
- description: Allow login to GDM on linux desktops
+ description: Allow login to SDDM on linux desktops
hostgroup:
- '{{ linux_desktop_hbac_hostgroup }}'
group:
- '{{ linux_desktop_access_group }}'
hbacsvc:
- - gdm
- - gdm-password
- - lightdm
+ - sddm
run_once: yes
diff --git a/roles/linux_desktop/tasks/main.yml b/roles/linux_desktop/tasks/main.yml
index 12b99a5..5eed9f9 100644
--- a/roles/linux_desktop/tasks/main.yml
+++ b/roles/linux_desktop/tasks/main.yml
@@ -4,19 +4,6 @@
exclude: '{{ linux_desktop_excluded_packages }}'
state: present
-# Sticking with tuned for now. On my thinkpad, the power-profiles-daemon sets the
-# CPU governor to "performance" in the "power-save" profile!
-- name: mask power-profiles-daemon
- systemd:
- name: power-profiles-daemon
- state: stopped
- masked: yes
-
-- name: make sure tuned wasn't killed by power-profiles-daemon
- systemd:
- name: tuned
- state: started
-
- name: enable GuC for intel card
copy:
content: |
@@ -36,21 +23,15 @@
dest: /etc/systemd/system/default.target
state: link
-- name: check if graphical target is active
- command: systemctl is-active graphical.target
- register: graphical_target
- changed_when: false
- failed_when: false
-
-- name: configure lightdm greeter
- template:
- src: etc/lightdm/lightdm-gtk-greeter.conf.j2
- dest: /etc/lightdm/lightdm-gtk-greeter.conf
- notify: restart lightdm
+- name: generate sddm configuration
+ copy:
+ src: etc/sddm.conf
+ dest: /etc/sddm.conf
+ notify: restart sddm
-- name: enable lightdm
+- name: enable sddm
systemd:
- name: lightdm
+ name: sddm
enabled: yes
state: started
@@ -83,24 +64,4 @@
changed_when: no
loop: '{{ linux_desktop_flatpak_overrides | dict2items }}'
-# https://gitlab.xfce.org/apps/xfce4-screensaver/-/issues/39
-- name: workaround user switching bug for xfce-screensaver
- file:
- path: /usr/share/dbus-1/services/org.xfce.ScreenSaver.service
- state: absent
-
-- name: create /usr/local/share/thumbnailers
- file:
- path: /usr/local/share/thumbnailers
- state: directory
-
-# see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=973942
-- name: patch totem thumbnailer to support large mp4 files
- copy:
- src: usr/local/share/thumbnailers/totem.thumbnailer
- dest: /usr/local/share/thumbnailers/totem.thumbnailer
-
-- import_tasks: theme.yml
- tags: theme
-
- import_tasks: freeipa.yml
diff --git a/roles/linux_desktop/tasks/theme.yml b/roles/linux_desktop/tasks/theme.yml
deleted file mode 100644
index b497020..0000000
--- a/roles/linux_desktop/tasks/theme.yml
+++ /dev/null
@@ -1,35 +0,0 @@
-- name: create qogir source directories
- file:
- path: '{{ item }}'
- state: directory
- loop:
- - '{{ linux_desktop_qogir_source_dir }}'
- - '{{ linux_desktop_qogir_icon_source_dir }}'
-
-- name: extract qogir tarball
- unarchive:
- src: '{{ linux_desktop_qogir_url }}'
- dest: '{{ linux_desktop_qogir_source_dir }}'
- remote_src: yes
- extra_opts:
- - --strip-components=1
- register: linux_desktop_qogir_unarchive
-
-- name: install qogir theme
- command:
- cmd: ./install.sh -d /usr/share/themes -t default
- chdir: '{{ linux_desktop_qogir_source_dir }}'
-
-- name: extract qogir icons tarball
- unarchive:
- src: '{{ linux_desktop_qogir_icon_url }}'
- dest: '{{ linux_desktop_qogir_icon_source_dir }}'
- remote_src: yes
- extra_opts:
- - --strip-components=1
- register: linux_desktop_qogir_icon_unarchive
-
-- name: install qogir icons
- command:
- cmd: ./install.sh -d /usr/share/icons -t default
- chdir: '{{ linux_desktop_qogir_icon_source_dir }}'
diff --git a/roles/linux_desktop/templates/etc/lightdm/lightdm-gtk-greeter.conf.j2 b/roles/linux_desktop/templates/etc/lightdm/lightdm-gtk-greeter.conf.j2
deleted file mode 100644
index 63c08ab..0000000
--- a/roles/linux_desktop/templates/etc/lightdm/lightdm-gtk-greeter.conf.j2
+++ /dev/null
@@ -1,10 +0,0 @@
-[greeter]
-background = {{ linux_desktop_lightdm_background }}
-theme-name = {{ linux_desktop_lightdm_gtk_theme }}
-icon-theme-name = {{ linux_desktop_lightdm_icon_theme }}
-cursor-theme-name = {{ linux_desktop_lightdm_cursor_theme }}
-cursor-theme-size = 16
-font-name = {{ linux_desktop_lightdm_font_name }}
-xft-rgba = rgb
-xft-hintstyle = hintfull
-hide-user-image = true
diff --git a/roles/linux_desktop/vars/main.yml b/roles/linux_desktop/vars/main.yml
index 834b51a..ee02811 100644
--- a/roles/linux_desktop/vars/main.yml
+++ b/roles/linux_desktop/vars/main.yml
@@ -5,7 +5,7 @@ linux_desktop_packages:
- '@base-x'
- '@networkmanager-submodules'
- '@print-client'
- - evolution
+ - '@KDE Plasma Workspaces'
- libreoffice-calc
- libreoffice-draw
- libreoffice-impress
@@ -14,7 +14,6 @@ linux_desktop_packages:
- ffmpeg-libs
- ffmpeg
- nfs4-acl-tools
- - hexchat
- vlc
- youtube-dl
- gstreamer1-plugins-ugly
@@ -23,45 +22,17 @@ linux_desktop_packages:
- gstreamer1-vaapi
- libva-utils
- intel-media-driver
- - seahorse
- inkscape
- libdvdcss
- gimp
- - brasero
- ntfs-3g
- ntfsprogs
- exfatprogs
- chromium
- audacious
- # xfce
- - '@Xfce'
- - ristretto
- - parole
- - mousepad
- - xfce4-weather-plugin
- - xfce4-taskmanager
- - xfce4-notifyd
- - xfce4-screenshooter
- - xfce4-whiskermenu-plugin
-
- # extra apps
- - engrampa
- - gnome-keyring
- - gnome-keyring-pam
- - evince
- - totem-video-thumbnailer
-
- # lightdm
- - lightdm
- - lightdm-gtk
-
- # qogir theme
- - gtk2-engines
- - gtk-murrine-engine
linux_desktop_excluded_packages:
- - gnome-software
- libva-intel-driver
linux_desktop_hbac_hostgroup: linux_desktops
@@ -78,7 +49,6 @@ linux_desktop_flatpaks:
- org.gnome.EasyTAG
- com.makemkv.MakeMKV
- org.gnucash.GnuCash
- - org.gnome.Rhythmbox3
- org.gajim.Gajim
- org.gajim.Gajim.Plugin.omemo
@@ -86,8 +56,3 @@ linux_desktop_flatpak_overrides:
org.gnome.EasyTAG: --filesystem=host
org.gnome.Rhythmbox3: --filesystem=host
org.signal.Signal: --env=SIGNAL_USE_TRAY_ICON=1
-
-linux_desktop_qogir_url: https://github.com/vinceliuice/Qogir-theme/archive/refs/tags/{{ linux_desktop_qogir_version }}.tar.gz
-linux_desktop_qogir_icon_url: https://github.com/vinceliuice/Qogir-icon-theme/archive/refs/tags/{{ linux_desktop_qogir_icon_version }}.tar.gz
-linux_desktop_qogir_source_dir: /usr/local/src/qogir
-linux_desktop_qogir_icon_source_dir: /usr/local/src/qogir-icons
diff --git a/roles/local_homedirs/tasks/main.yml b/roles/local_homedirs/tasks/main.yml
index 0debbb1..7e90959 100644
--- a/roles/local_homedirs/tasks/main.yml
+++ b/roles/local_homedirs/tasks/main.yml
@@ -11,18 +11,18 @@
setype: _default
loop:
- '{{ local_homedir_script_ssh }}'
- - '{{ local_homedir_script_gdm }}'
+ - '{{ local_homedir_script_sddm }}'
- name: set xdm_unconfined_exec_t sefcontext on homedir creation script
sefcontext:
- target: '{{ local_homedir_script_gdm }}'
+ target: '{{ local_homedir_script_sddm }}'
state: present
setype: xdm_unconfined_exec_t
tags: selinux
register: local_homedir_sefcontext
- name: apply selinux context to homedir creation script
- command: 'restorecon -R {{ local_homedir_script_gdm }}'
+ command: 'restorecon -R {{ local_homedir_script_sddm }}'
when: local_homedir_sefcontext.changed
tags: selinux
@@ -50,31 +50,20 @@
command: restorecon -R /usr/local/home
when: local_homedirs_fcontext.changed
-- name: check if gdm is installed
+- name: check if sddm is installed
package_facts:
manager: auto
-- name: modify GDM PAM configuration for local homedirs
+- name: modify sddm PAM configuration for local homedirs
lineinfile:
- path: /etc/pam.d/gdm-password
- line: '{{ item }}'
- insertbefore: ^auth\s+optional\s+pam_gnome_keyring\.so$
- state: present
- loop:
- - auth optional pam_exec.so {{ local_homedir_script_gdm }}
- - auth optional pam_env.so conffile={{ local_homedir_pam_env_path }}
- when: "'gdm' in ansible_facts.packages"
-
-- name: modify LightDM PAM configuration for local homedirs
- lineinfile:
- path: /etc/pam.d/lightdm
+ path: /etc/pam.d/sddm
line: '{{ item }}'
insertbefore: auth\s+optional\s+pam_gnome_keyring\.so$
state: present
loop:
- - auth optional pam_exec.so {{ local_homedir_script_gdm }}
+ - auth optional pam_exec.so {{ local_homedir_script_sddm }}
- auth optional pam_env.so conffile={{ local_homedir_pam_env_path }}
- when: "'lightdm' in ansible_facts.packages"
+ when: "'sddm' in ansible_facts.packages"
- name: modify pam configs for sshd
lineinfile:
diff --git a/roles/local_homedirs/vars/main.yml b/roles/local_homedirs/vars/main.yml
index a004c12..46ee9b6 100644
--- a/roles/local_homedirs/vars/main.yml
+++ b/roles/local_homedirs/vars/main.yml
@@ -1,3 +1,3 @@
-local_homedir_script_gdm: /usr/local/sbin/create-local-homedir-gdm.sh
+local_homedir_script_sddm: /usr/local/sbin/create-local-homedir-gdm.sh
local_homedir_script_ssh: /usr/local/sbin/create-local-homedir-ssh.sh
local_homedir_pam_env_path: /etc/security/pam_env_xdg.conf