diff options
Diffstat (limited to 'scripts/hostclass/desktop')
-rw-r--r-- | scripts/hostclass/desktop | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/scripts/hostclass/desktop b/scripts/hostclass/desktop index 1fa17cc..f9e7e94 100644 --- a/scripts/hostclass/desktop +++ b/scripts/hostclass/desktop @@ -2,10 +2,11 @@ : ${desktop_access_role:='desktop-access'} : ${desktop_access_gid:='40000'} - : ${sddm_min_uid:='10000'} : ${sddm_max_uid:='19999'} +sddm_user=sddm + # TODO: kill lingering processes after logout (chrome, baloo-search, etc). if [ "${enable_idm:-}" = false ]; then @@ -34,6 +35,25 @@ install_file -m 0555 \ /etc/profile.d/local-homedir.sh install_directory -m 0755 /usr/local/home +# Enable sndio. +sysrc -v sndiod_enable=YES +service sndiod status || service sndiod start + +# Create local group for desktop-access. +# This is for *local* users that need access to the drm device. +add_group -g "$desktop_access_gid" "$desktop_access_role" + +# Create desktop devfs ruleset. +install_template -m 0644 /etc/devfs.rules +sysrc -v "devfs_system_ruleset=${devfs_local_ruleset_name}" +service devd restart + +# Enable webcamd. +load_kernel_module cuse +set_loader_conf cuse_load=YES +sysrc -v webcamd_enable=YES +service webcamd status || service webcamd start + case $desktop_type in i3) pkg install -y $desktop_i3_packages @@ -42,6 +62,9 @@ case $desktop_type in # Install KDE packages. pkg install -y $desktop_kde_packages + # Add sddm user to drm access group. + pw groupmod "$desktop_access_role" -m "$sddm_user" + # Configure pam services. install_file -m 0644 \ /etc/pam.d/sddm \ @@ -56,6 +79,12 @@ case $desktop_type in # Create SDDM local homedir. install_directory -o sddm -g sddm -m 0700 /usr/local/home/sddm + # Create shutdown script to cleanup lingering processes. + install_directory -m 0755 \ + /usr/local/etc/xdg/plasma-workspace \ + /usr/local/etc/xdg/plasma-workspace/shutdown + install_file -m 0555 /usr/local/etc/xdg/plasma-workspace/shutdown/cleanup.sh + # Enable sddm. sysrc -v sddm_enable=YES ;; |