Skip to content

Commit

Permalink
Lot's of changes
Browse files Browse the repository at this point in the history
  • Loading branch information
m0ngr31 committed Jan 27, 2024
1 parent a2944c5 commit e3857a9
Show file tree
Hide file tree
Showing 26 changed files with 1,477 additions and 140 deletions.
3 changes: 1 addition & 2 deletions config/common_modules/bling.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
type: bling
install:
- dconf-update-service
- ublue-update
- container-tools
- ublue-update
1 change: 1 addition & 0 deletions config/common_modules/default-flatpaks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ system:
- com.mattjakeman.ExtensionManager
- sa.sy.bluerecorder
- org.mozilla.firefox
- it.mijorus.gearlever
user:
repo-url: https://dl.flathub.org/repo/flathub.flatpakrepo
repo-name: flathub-user
Expand Down
7 changes: 7 additions & 0 deletions config/common_modules/fonts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- type: fonts
fonts:
google-fonts:
- Roboto
- Open Sans
- Fira Code
- JetBrains Mono
5 changes: 5 additions & 0 deletions config/common_modules/initramfs-setup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type: initramfs-setup
include:
- /etc/crypttab
- /etc/vconsole.conf
- /etc/modprobe.d/modprobe-gidro.conf
16 changes: 10 additions & 6 deletions config/common_modules/rpm-ostree.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,13 @@ install:
- system76-scheduler
- system76-power
- android-tools
- nerd-fonts
- zsh
- gnome-boxes
- code
- docker-ce
- docker-ce-cli
- docker-buildx-plugin
- docker-compose-plugin
- containerd.io
- p7zip
- p7zip-plugins
- podman-compose
- podman-docker
- podman-plugins
- podman-tui
- podmansh
Expand All @@ -38,6 +33,15 @@ install:
- samba-winbind-clients
- samba-winbind-modules
- libvirt
- qemu-char-spice
- qemu-device-display-virtio-gpu
- qemu-device-display-virtio-vga
- qemu-device-usb-redirect
- qemu-img
- qemu-system-x86-core
- qemu-user-binfmt
- qemu-user-static
- qemu

remove:
- firefox
Expand Down
8 changes: 8 additions & 0 deletions config/files/etc/default/useradd
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# useradd defaults file
GROUP=100
HOME=/var/home
INACTIVE=-1
EXPIRE=
SHELL=/usr/bin/zsh
SKEL=/etc/skel
CREATE_MAIL_SPOOL=yes
11 changes: 11 additions & 0 deletions config/files/etc/modprobe.d/modprobe-cabos.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Use Vulkan driver for AMD GCN 1.0 & GCN 2.0 GPUs (HD 7000-8000 series)
options amdgpu si_support=1
options amdgpu cik_support=1
options radeon si_support=0
options radeon cik_support=0

# Blacklist the Intel TCO Watchdog/Timer module
blacklist iTCO_wdt

# Blacklist the AMD SP5100 TCO Watchdog/Timer module (Required for Ryzen CPUs)
blacklist sp5100_tco
6 changes: 0 additions & 6 deletions config/files/etc/yum.repos.d/docker-ce.repo

This file was deleted.

45 changes: 14 additions & 31 deletions config/files/usr/bin/dx-user-gsettings
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

# SCRIPT VERSION
USER_SETUP_VER=2
USER_SETUP_VER=3
USER_SETUP_VER_FILE="${XDG_DATA_HOME:-$HOME/.local/share}/cabos/gsettings-configured"
USER_SETUP_VER_RAN=$(cat "$USER_SETUP_VER_FILE")

Expand All @@ -15,7 +15,7 @@ if [[ -f $USER_SETUP_VER_FILE && "$USER_SETUP_VER" = "$USER_SETUP_VER_RAN" ]]; t
exit 0
fi

gsettings set org.gnome.shell favorite-apps "['org.mozilla.firefox.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop', 'org.gnome.Terminal.desktop', 'code.desktop']"
gsettings set org.gnome.shell favorite-apps "['org.mozilla.firefox.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop', 'Prompt.desktop', 'code.desktop']"
gsettings set org.gnome.shell enabled-extensions "['hide-universal-access@akiirui.github.io', 'dash-to-panel@jderose9.github.com', 'blur-my-shell@aunetx', 'gsconnect@andyholmes.github.io', 'appindicatorsupport@rgcjonas.gmail.com', 's76-scheduler@mattjakeman.com', 'caffeine@patapon.info', 'start-overlay-in-application-view@Hex_cz', 'workspace-switch-wraparound@theychx.org', 'disable-workspace-animation@ethnarque', 'disable-workspace-switcher-overlay@cleardevice']"

gsettings set org.gnome.mutter workspaces-only-on-primary false
Expand Down Expand Up @@ -63,35 +63,18 @@ gsettings set org.gnome.shell.extensions.dash-to-panel isolate-workspaces true
gsettings set org.gnome.shell.app-switcher current-workspace-only true

# Terminal theme
PROFILE_UUID=$(uuidgen)

gsettings set org.gnome.Terminal.ProfilesList list "$(gsettings get org.gnome.Terminal.ProfilesList list | sed "s/]/, '$PROFILE_UUID']/")"

dconf write "/org/gnome/terminal/legacy/profiles:/:$PROFILE_UUID/audible-bell" false
dconf write "/org/gnome/terminal/legacy/profiles:/:$PROFILE_UUID/background-color" "'#3d4752'"
dconf write "/org/gnome/terminal/legacy/profiles:/:$PROFILE_UUID/bold-color-same-as-fg" true
dconf write "/org/gnome/terminal/legacy/profiles:/:$PROFILE_UUID/font" "'FiraMono Nerd Font 12'"
dconf write "/org/gnome/terminal/legacy/profiles:/:$PROFILE_UUID/foreground-color" "'#ffffff'"
dconf write "/org/gnome/terminal/legacy/profiles:/:$PROFILE_UUID/palette" "['#3d4752','#ff8e7d','#a3d971','#ffdf67','#80bbe7','#f6b4c8','#55bba7','#e6e6e6','#505c6a','#ffc36d','#55bba7','#ffdf67','#80bbe7','#f6b4c8','#55bba7','#ffffff']"
dconf write "/org/gnome/terminal/legacy/profiles:/:$PROFILE_UUID/use-system-font" false
dconf write "/org/gnome/terminal/legacy/profiles:/:$PROFILE_UUID/use-theme-colors" false
dconf write "/org/gnome/terminal/legacy/profiles:/:$PROFILE_UUID/visible-name" "'Lucid'"

gsettings set org.gnome.Terminal.ProfilesList default "'$PROFILE_UUID'"

PROFILE_UUID_LIGHT=$(uuidgen)

gsettings set org.gnome.Terminal.ProfilesList list "$(gsettings get org.gnome.Terminal.ProfilesList list | sed "s/]/, '$PROFILE_UUID']/")"

dconf write "/org/gnome/terminal/legacy/profiles:/:$PROFILE_UUID_LIGHT/audible-bell" false
dconf write "/org/gnome/terminal/legacy/profiles:/:$PROFILE_UUID_LIGHT/background-color" "'#ffffff'"
dconf write "/org/gnome/terminal/legacy/profiles:/:$PROFILE_UUID_LIGHT/bold-color-same-as-fg" true
dconf write "/org/gnome/terminal/legacy/profiles:/:$PROFILE_UUID_LIGHT/font" "'FiraMono Nerd Font 12'"
dconf write "/org/gnome/terminal/legacy/profiles:/:$PROFILE_UUID_LIGHT/foreground-color" "'#3d4752'"
dconf write "/org/gnome/terminal/legacy/profiles:/:$PROFILE_UUID_LIGHT/palette" "['#3d4752','#cb2735','#79b63f','#fec31d','#007dbc','#e05c84','#05977d','#e6e6e6','#505c6a','#f28c00','#05977d','#fec31d','#007dbc','#e05c84','#05977d','#ffffff']"
dconf write "/org/gnome/terminal/legacy/profiles:/:$PROFILE_UUID_LIGHT/use-system-font" false
dconf write "/org/gnome/terminal/legacy/profiles:/:$PROFILE_UUID_LIGHT/use-theme-colors" false
dconf write "/org/gnome/terminal/legacy/profiles:/:$PROFILE_UUID_LIGHT/visible-name" "'Lucid Light'"
output=$(gsettings get org.gnome.Prompt profile-uuids)

# Extract the UUID using sed and strip single quotes
PROFILE_UUID=$(echo "$output" | sed "s/[][]//g; s/'//g")

gsettings set org.gnome.Prompt audible-bell false
gsettings set org.gnome.Prompt visual-bell false
gsettings set org.gnome.Prompt use-system-font false
# gsettings set org.gnome.Prompt font-name 'Fira Code 13'

dconf write /org/gnome/Prompt/Profiles/$PROFILE_UUID/palette "'lucid'"
dconf write /org/gnome/Prompt/Profiles/$PROFILE_UUID/label "'Default'"

# Prevent future executions
echo "Writing state file"
Expand Down
1 change: 0 additions & 1 deletion config/files/usr/bin/dx-user-vscode
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ fi
# Pre-install preferred VSCode Extensions
code --install-extension ms-vscode-remote.remote-containers
code --install-extension ms-azuretools.vscode-docker
code --install-extension trongthanh.theme-boxythemekit
code --install-extension EditorConfig.EditorConfig
code --install-extension dbaeumer.vscode-eslint
code --install-extension drKnoxy.eslint-disable-snippets
Expand Down
104 changes: 54 additions & 50 deletions config/files/usr/bin/initramfs-setup
Original file line number Diff line number Diff line change
@@ -1,53 +1,32 @@
#!/usr/bin/env bash

# Global variables - Needed initramfs file arguments contain tracked file arguments dictated by the module & by the live-user
tracked_file="/etc/ublue-os/initramfs/tracked"
# Global initramfs variables - Needed initramfs file arguments contain tracked file arguments dictated by the module & by the live-user
tracked_file="/usr/share/ublue-os/initramfs/tracked"
custom_tracked_file="/etc/ublue-os/initramfs/tracked-custom"
rebuild_file="/etc/ublue-os/initramfs/rebuild"
readarray -t current < <(rpm-ostree initramfs-etc | tr -d ' ' | tail -n +2)
readarray -t needed < <(grep -v -E '^#|^$' "$tracked_file" && grep -v -E '^#|^$' "$custom_tracked_file")
readarray -t needed < <(cat "$tracked_file" "$custom_tracked_file" 2>/dev/null | grep -v -E '^#|^$')

applies_tracking=false
applies_untracking=false
dracut_tracked_file="/etc/ublue-os/initramfs/dracut-tracked"
dracut_custom_tracked_file="/etc/ublue-os/initramfs/dracut-tracked-custom"
readarray -t dracut_current < <(ls -A /etc/dracut.conf.d)
readarray -t dracut_needed < <(grep -v -E '^#|^$' "$dracut_tracked_file" && grep -v -E '^#|^$' "$dracut_custom_tracked_file")
applies_dracut=false

# Print current dracut file configs
printf "Current dracut file configs:\n"
for current_file in "${dracut_current[@]}"; do
printf "%s\n" "$current_file"
done
applies_rebuilding=false

# Print current initramfs file arguments
printf "Current initramfs:\n"
for current_file in "${current[@]}"; do
printf "%s\n" "$current_file"
done

# If current dracut is missing needed file arguments, make it ready for tracking
for needed_arg in "${dracut_needed[@]}"; do
found=false
for current_arg in "${dracut_current[@]}"; do
if [[ "$current_arg" == "$needed_arg" ]]; then
found=true
break
fi
done
if ! $found; then
applies_dracut=true
fi
done

# If current initramfs is missing needed file arguments, make them ready for tracking
for needed_arg in "${needed[@]}"; do
found=false
for current_arg in "${current[@]}"; do
if [[ "$current_arg" == "$needed_arg" ]]; then
if [[ "$current_arg" == "$needed_arg" || "${#current[@]}" -gt "${#needed[@]}" ]]; then
found=true
break
fi
done
# If "needed initramfs" has more array elements than "current initramfs", prepare for tracking
if ! $found; then
applies_tracking=true
fi
Expand All @@ -57,57 +36,82 @@ done
for current_arg in "${current[@]}"; do
found=false
for needed_arg in "${needed[@]}"; do
if [[ "$needed_arg" == "$current_arg" ]]; then
if [[ "$needed_arg" == "$current_arg" || "${#needed[@]}" -gt "${#current[@]}" ]]; then
found=true
break
fi
done
# If "current initramfs" has more array elements than "needed initramfs", prepare for untracking
if ! $found; then
applies_untracking=true
untracked+=("$current_arg")
fi
done

# If "rebuild" file exists, prepare for initramfs rebuild
if [ -f "$rebuild_file" ]; then
applies_rebuilding=true
fi

# Apply --track= & --untrack= prefixes to tracked & untracked file arguments
tracked_args=("${needed[@]/#/--track=}")
untracked_args=("${untracked[@]/#/--untrack=}")

# Track & untrack file arguments based on given data + ready conditions, display boot screen message & reboot. Also supports dracut.
if $applies_tracking || $applies_untracking || $applies_dracut; then
if $applies_tracking && ! $applies_untracking && ! $applies_dracut; then
# Track & untrack file arguments based on given data + ready conditions, display boot screen message & reboot. Also detects if initramfs rebuilding is enabled.
if $applies_tracking || $applies_untracking || $applies_rebuilding; then

# Tracked initramfs
if $applies_tracking && ! $applies_untracking && ! $applies_rebuilding; then
printf "Found needed tracking initramfs changes, applying the following: %s\n" "${needed[*]}"
plymouth display-message --text="Updating initramfs - System will reboot" || true
rpm-ostree initramfs-etc "${tracked_args[@]}" --reboot
elif ! $applies_tracking && $applies_untracking && ! $applies_dracut; then

# Untracked initramfs
elif ! $applies_tracking && $applies_untracking && ! $applies_rebuilding; then
printf "Found needed removal of non-active tracked files, removing the following: %s\n" "${untracked[*]}"
plymouth display-message --text="Updating initramfs - System will reboot" || true
rpm-ostree initramfs-etc "${untracked_args[@]}" --reboot
elif $applies_tracking && $applies_untracking && ! $applies_dracut; then

# Tracked & untracked initramfs
elif $applies_tracking && $applies_untracking && ! $applies_rebuilding; then
printf "Found needed tracking initramfs changes, applying the following: %s\n" "${needed[*]}"
printf "Also applying needed removal of non-active tracked files: %s\n" "${untracked[*]}"
plymouth display-message --text="Updating initramfs - System will reboot" || true
rpm-ostree initramfs-etc "${tracked_args[@]}" "${untracked_args[@]}" --reboot
elif $applies_tracking && ! $applies_untracking && $applies_dracut; then

# Rebuild initramfs
elif ! $applies_tracking && ! $applies_untracking && $applies_rebuilding; then
echo "Initramfs rebuilding is enabled, proceeding"
rm -f "$rebuild_file"
plymouth display-message --text="Rebuilding initramfs - System will reboot" || true
rpm-ostree initramfs-etc --force-sync --reboot

# Tracked + rebuild initramfs
elif $applies_tracking && ! $applies_untracking && $applies_rebuilding; then
printf "Found needed tracking initramfs changes, applying the following: %s\n" "${needed[*]}"
echo "Also found dracut changes, so initramfs will be force rebuilt."
plymouth display-message --text="Updating initramfs with initramfs + dracut changes - System will reboot" || true
echo "Initramfs rebuilding is enabled, proceeding"
rm -f "$rebuild_file"
plymouth display-message --text="Updating & rebuilding initramfs - System will reboot" || true
rpm-ostree initramfs-etc "${tracked_args[@]}" --force-sync --reboot
elif ! $applies_tracking && $applies_untracking && $applies_dracut; then

# Untracked + rebuild initramfs
elif ! $applies_tracking && $applies_untracking && $applies_rebuilding; then
printf "Found needed removal of non-active tracked files, removing the following: %s\n" "${untracked[*]}"
echo "Also found dracut changes, so initramfs will be force rebuilt."
plymouth display-message --text="Updating initramfs with initramfs + dracut changes - System will reboot" || true
echo "Initramfs rebuilding is enabled, proceeding"
rm -f "$rebuild_file"
plymouth display-message --text="Updating & rebuilding initramfs - System will reboot" || true
rpm-ostree initramfs-etc "${untracked_args[@]}" --force-sync --reboot
elif $applies_tracking && $applies_untracking && $applies_dracut; then

# Tracked & untracked + rebuild initramfs
elif $applies_tracking && $applies_untracking && $applies_rebuilding; then
printf "Found needed tracking initramfs changes, applying the following: %s\n" "${needed[*]}"
printf "Also applying needed removal of non-active tracked files: %s\n" "${untracked[*]}"
echo "Also found dracut changes, so initramfs will be force rebuilt."
plymouth display-message --text="Updating initramfs with initramfs + dracut changes - System will reboot" || true
echo "Initramfs rebuilding is enabled, proceeding"
rm -f "$rebuild_file"
plymouth display-message --text="Updating & rebuilding initramfs - System will reboot" || true
rpm-ostree initramfs-etc "${tracked_args[@]}" "${untracked_args[@]}" --force-sync --reboot
elif ! $applies_tracking && ! $applies_untracking && $applies_dracut; then
echo "Found needed dracut-only changes, force rebuilding initramfs & rebooting"
plymouth display-message --text="Updating initramfs with dracut changes only - System will reboot" || true
rpm-ostree initramfs-etc --force-sync --reboot
fi
fi

else
echo "No initramfs & dracut changes detected"
echo "No initramfs changes detected"
fi
10 changes: 2 additions & 8 deletions config/files/usr/etc/skel.d/.config/Code/User/settings.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
{
"workbench.colorCustomizations": {
"sideBar.background": "#3c4c55cc",
"activityBar.background": "#3c4c55",
"activityBar.foreground": "#fff",
"activityBarBadge.background": "#ec5f67cc"
},
"editor.fontLigatures": true,
"editor.fontFamily": "FiraCode Nerd Font",
"editor.fontFamily": "Fira Code",
"editor.tabSize": 2,
"telemetry.telemetryLevel": "off",
"workbench.colorTheme": "Boxy Nova",
"workbench.colorTheme": "Lucid Dark",
"files.trimTrailingWhitespace": true,
"extensions.ignoreRecommendations": false,
"git.confirmSync": false,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[Palette]
Name=Lucid

[Light]
Foreground=#3d4752
Background=#ffffff
Color0=#3d4752
Color1=#cb2735
Color2=#79b63f
Color3=#fec31d
Color4=#007dbc
Color5=#e05c84
Color6=#05977d
Color7=#e6e6e6
Color8=#505c6a
Color9=#f28c00
Color10=#05977d
Color11=#fec31d
Color12=#007dbc
Color13=#e05c84
Color14=#05977d
Color15=#ffffff

[Dark]
Foreground=#ffffff
Background=#3d4752
Color0=#3d4752
Color1=#ff8e7d
Color2=#a3d971
Color3=#ffdf67
Color4=#80bbe7
Color5=#f6b4c8
Color6=#55bba7
Color7=#e6e6e6
Color8=#505c6a
Color9=#ffc36d
Color10=#55bba7
Color11=#ffdf67
Color12=#80bbe7
Color13=#f6b4c8
Color14=#55bba7
Color15=#ffffff

Loading

0 comments on commit e3857a9

Please sign in to comment.