generated from ublue-os/image-template
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: make ublue user services work with helper script (#346)
This uses an upstream script I wrote so that we can version all the files better :) This should finally fix our out of the box experience :) Requires: ublue-os/packages#252 Fixes: #232 Fixes: #323 Fixes: #175 (for sure now)
- Loading branch information
1 parent
dc84a67
commit fc08670
Showing
7 changed files
with
56 additions
and
57 deletions.
There are no files selected for viewing
8 changes: 5 additions & 3 deletions
8
system_files/usr/share/ublue-os/privileged-setup.hooks.d/10-tailscale.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
#!/usr/bin/bash | ||
|
||
# Enable NTP | ||
timedatectl set-ntp true | ||
source /usr/lib/ublue/setup-services/libsetup.sh | ||
|
||
version-script tailscale-lts privileged 1 || exit 0 | ||
|
||
set -xeuo pipefail | ||
|
||
# Allow Tailscale Control | ||
tailscale set --operator="$(getent passwd "$PKEXEC_UID" | cut -d: -f1)" |
17 changes: 17 additions & 0 deletions
17
system_files/usr/share/ublue-os/privileged-setup.hooks.d/99-flatpaks.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/bash | ||
|
||
source /usr/lib/ublue/setup-services/libsetup.sh | ||
|
||
version-script flatpaks-lts privileged 1 || exit 0 | ||
|
||
set -x | ||
|
||
# Set up Firefox default configuration | ||
ARCH=$(arch) | ||
if [ "$ARCH" != "aarch64"] ; then | ||
mkdir -p "/var/lib/flatpak/extension/org.mozilla.firefox.systemconfig/${ARCH}/stable/defaults/pref" | ||
rm -f "/var/lib/flatpak/extension/org.mozilla.firefox.systemconfig/${ARCH}/stable/defaults/pref/*bluefin*.js" | ||
/usr/bin/cp -rf /usr/share/ublue-os/firefox-config/* "/var/lib/flatpak/extension/org.mozilla.firefox.systemconfig/${ARCH}/stable/defaults/pref/" | ||
fi | ||
|
||
notify-send "Welcome to Bluefin LTS" "Your computer is ready!" --app-name="Flatpak Manager Service" -u NORMAL |
34 changes: 13 additions & 21 deletions
34
system_files/usr/share/ublue-os/user-setup.hooks.d/10-theming.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
VEN_ID="$(cat /sys/devices/virtual/dmi/id/chassis_vendor)" | ||
source /usr/lib/ublue/setup-services/libsetup.sh | ||
|
||
# Ensure custom ptyxis theme is present | ||
PTYXIS_THEME_DIR="/etc/skel/.local/share/org.gnome.Ptyxis/palettes" | ||
PTYXIS_DIR="$HOME/.local/share/org.gnome.Ptyxis/palettes" | ||
mkdir -p "$PTYXIS_DIR" | ||
if [[ ! -f "$PTYXIS_DIR/catppuccin-dynamic.palette" ]]; then | ||
cp "$PTYXIS_THEME_DIR/catppuccin-dynamic.palette" "$PTYXIS_DIR/catppuccin-dynamic.palette" | ||
fi | ||
version-script theming-lts user 1 || exit 0 | ||
|
||
UBLUE_CONFIG_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/ublue" | ||
mkdir -p "$UBLUE_CONFIG_DIR" | ||
set -xeuo pipefail | ||
|
||
VEN_ID="$(cat /sys/devices/virtual/dmi/id/chassis_vendor)" | ||
|
||
if [[ ":Framework:" =~ :$VEN_ID: ]]; then | ||
if [[ ! -f "$UBLUE_CONFIG_DIR/framework-initialized" ]]; then | ||
echo 'Setting Framework logo menu' | ||
dconf write /org/gnome/shell/extensions/Logo-menu/symbolic-icon true | ||
dconf write /org/gnome/shell/extensions/Logo-menu/menu-button-icon-image 31 | ||
echo 'Setting touch scroll type' | ||
dconf write /org/gnome/desktop/peripherals/mouse/natural-scroll true | ||
if [[ $SYS_ID == "Laptop ("* ]]; then | ||
echo 'Applying font fix for Framework 13' | ||
dconf write /org/gnome/desktop/interface/text-scaling-factor 1.25 | ||
fi | ||
touch "$UBLUE_CONFIG_DIR/framework-initialized" | ||
echo 'Setting Framework logo menu' | ||
dconf write /org/gnome/shell/extensions/Logo-menu/symbolic-icon true | ||
dconf write /org/gnome/shell/extensions/Logo-menu/menu-button-icon-image 31 | ||
echo 'Setting touch scroll type' | ||
dconf write /org/gnome/desktop/peripherals/mouse/natural-scroll true | ||
if [[ $SYS_ID == "Laptop ("* ]]; then | ||
echo 'Applying font fix for Framework 13' | ||
dconf write /org/gnome/desktop/interface/text-scaling-factor 1.25 | ||
fi | ||
fi |
29 changes: 0 additions & 29 deletions
29
system_files/usr/share/ublue-os/user-setup.hooks.d/99-flatpaks.sh
This file was deleted.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
system_files/usr/share/ublue-os/user-setup.hooks.d/99-privileged.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
echo "Running all privileged units" | ||
|
||
pkexec /usr/libexec/ublue-privileged-setup |
4 changes: 4 additions & 0 deletions
4
system_files_overrides/dx/usr/share/ublue-os/privileged-setup.hooks.d/20-dx.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 10 additions & 4 deletions
14
system_files_overrides/dx/usr/share/ublue-os/user-setup.hooks.d/11-vscode.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
#!/usr/bin/bash | ||
|
||
# Setup VSCode | ||
code --install-extension ms-vscode-remote.remote-containers | ||
code --install-extension ms-vscode-remote.remote-ssh | ||
code --install-extension ms-azuretools.vscode-docker | ||
source /usr/lib/ublue/setup-services/libsetup.sh | ||
|
||
version-script vscode-lts user 1 || exit 1 | ||
|
||
set -x | ||
|
||
# Setup VSCode | ||
if test ! -e "$HOME"/.config/Code/User/settings.json; then | ||
mkdir -p "$HOME"/.config/Code/User | ||
cp -f /etc/skel/.config/Code/User/settings.json "$HOME"/.config/Code/User/settings.json | ||
fi | ||
|
||
code --install-extension ms-vscode-remote.remote-containers | ||
code --install-extension ms-vscode-remote.remote-ssh | ||
code --install-extension ms-azuretools.vscode-docker |