diff options
author | Cullum Smith <cullum@sacredheartsc.com> | 2024-12-07 09:46:11 -0500 |
---|---|---|
committer | Cullum Smith <cullum@sacredheartsc.com> | 2024-12-07 09:46:11 -0500 |
commit | 3bf88b434d231231bbbcb9a9d34eae91778016cf (patch) | |
tree | 903af25abd49155841decab469876ee19b2e53fa /scripts/hostclass | |
parent | 3d89a01c4b1cf1aa1815e8c46d5d6b74b0f9f374 (diff) | |
download | infrastructure-3bf88b434d231231bbbcb9a9d34eae91778016cf.tar.gz |
fixes for laptops
Diffstat (limited to 'scripts/hostclass')
-rw-r--r-- | scripts/hostclass/desktop | 79 | ||||
-rw-r--r-- | scripts/hostclass/laptop/20-laptop | 5 | ||||
-rw-r--r-- | scripts/hostclass/roadwarrior_laptop/30-roadwarrior | 10 |
3 files changed, 44 insertions, 50 deletions
diff --git a/scripts/hostclass/desktop b/scripts/hostclass/desktop index e6ddd86..8fdfca4 100644 --- a/scripts/hostclass/desktop +++ b/scripts/hostclass/desktop @@ -23,15 +23,19 @@ fi # Load linux kernel modules. sysrc -v linux_enable=YES +service linux start # Enable FUSE. sysrc -v kld_list+=fusefs +load_kernel_module fusefs # Install packages common to all DEs. -pkg install -y $desktop_common_packages +pkg install -y $desktop_packages # Install profile script for improving experience on NFS homedirs. -install_file -m 0555 /etc/profile.d/local-homedir.sh +if [ "${enable_idm:-}" != false ]; then + install_file -m 0555 /etc/profile.d/local-homedir.sh +fi # Create ZFS dataset for local homedirs. create_dataset -o mountpoint=/usr/local/home "${state_dataset}/home" @@ -65,51 +69,41 @@ install_file -m 0555 /usr/local/libexec/nss-trust-root-ca # Install gajim desktop file. install_file -m 0644 /usr/local/share/applications/gajim.desktop -case $desktop_type in - i3) - pkg install -y $desktop_i3_packages - ;; - kde) - # Install KDE packages. - pkg install -y $desktop_kde_packages - - # Add sddm user to drm access group. - pw groupmod "$desktop_access_role" -m "$sddm_user" +# 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 \ - /etc/pam.d/kde +# Configure pam services. +install_file -m 0644 \ + /etc/pam.d/sddm \ + /etc/pam.d/kde - # Copy SDDM config file. - install_template -m 0644 /usr/local/etc/sddm.conf +# Copy SDDM config file. +install_template -m 0644 /usr/local/etc/sddm.conf - # Create profile script for KDE environment variables. - install_file -m 0644 /etc/profile.d/kde.sh +# Create profile script for KDE environment variables. +install_file -m 0644 /etc/profile.d/kde.sh - # Create SDDM local homedir. - install_directory -o sddm -g sddm -m 0700 /usr/local/home/sddm +# 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 +# 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 - # Disable baloo file search. - # Don't know anyone that uses it, and litters $HOME with .nfs files whenever - # any file is deleted. - install_file -m 0644 /usr/local/etc/xdg/baloofilerc +# Disable baloo file search. +# Don't know anyone that uses it, and litters $HOME with .nfs files whenever +# any file is deleted. +install_file -m 0644 /usr/local/etc/xdg/baloofilerc - # Disable user switching - # Broken with consolekit: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221452 - # VT switch causes loss of graphics acceleration: https://github.com/freebsd/drm-kmod/issues/175 - install_file -m 0644 /usr/local/etc/xdg/kdeglobals +# Disable user switching +# Broken with consolekit: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221452 +# VT switch causes loss of graphics acceleration: https://github.com/freebsd/drm-kmod/issues/175 +install_file -m 0644 /usr/local/etc/xdg/kdeglobals - # Enable sddm. - sysrc -v sddm_enable=YES - ;; -esac +# Enable sddm. +sysrc -v sddm_enable=YES # Tune sysctls for desktop usage. set_sysctl \ @@ -186,9 +180,4 @@ set_sysctl kern.vt.suspendswitch="${vt_suspendswitch:-1}" install_template -m 0644 /usr/local/etc/mpv/mpv.conf # Start login manager. -case $desktop_type in - kde) - # We have to redirect the output here because sddm holds FDs open :( - service sddm status || service sddm start > /dev/null 2>&1 < /dev/null || die 'failed to start sddm' - ;; -esac +service sddm status || service sddm start > /dev/null 2>&1 < /dev/null || die 'failed to start sddm' diff --git a/scripts/hostclass/laptop/20-laptop b/scripts/hostclass/laptop/20-laptop index 5c9cfd0..5a26b4c 100644 --- a/scripts/hostclass/laptop/20-laptop +++ b/scripts/hostclass/laptop/20-laptop @@ -4,11 +4,6 @@ usbconfig | awk -F: '{ print $1 }' | xargs -rtn1 -I% usbconfig -d % power_save ||: install_file /etc/rc.local -# Create devd rule for lid close. -install_file -m 0555 /usr/local/libexec/lid-close -install_file -m 0644 /etc/devd/lid-close.conf -service devd restart - # Enable kernel module for Android USB tethering. load_kernel_module if_urndis set_loader_conf if_urndis_load=YES diff --git a/scripts/hostclass/roadwarrior_laptop/30-roadwarrior b/scripts/hostclass/roadwarrior_laptop/30-roadwarrior index f75685a..cf3219d 100644 --- a/scripts/hostclass/roadwarrior_laptop/30-roadwarrior +++ b/scripts/hostclass/roadwarrior_laptop/30-roadwarrior @@ -8,3 +8,13 @@ install_file -m 0600 \ # Configure devd for Android USB tethering. install_file -m 0644 /etc/devd/usb-tether.conf service devd restart + +# Configure KRB5/LDAP. But only for manual use, not for NSS/PAM. +pkg install -y \ + krb5 \ + cyrus-sasl-gssapi \ + openldap26-client + +install_template -m 0644 \ + /etc/krb5.conf \ + /usr/local/etc/openldap/ldap.conf |