diff --git a/config/common-modules.yml b/config/common-modules.yml new file mode 100644 index 0000000..5634a8a --- /dev/null +++ b/config/common-modules.yml @@ -0,0 +1,130 @@ +type: akmods +install: + - v4l2loopback + - xone + - xpadneo + - xpad-noone + - winesync + +type: files +files: + - usr: /usr + - etc: /etc + +type: initramfs-setup +include: + - /etc/crypttab + - /etc/vconsole.conf + - /etc/modprobe.d/modprobe-gidro.conf + +type: rpm-ostree +repos: + - https://copr.fedorainfracloud.org/coprs/kylegospo/system76-scheduler/repo/fedora-%OS_VERSION%/kylegospo-system76-scheduler-fedora-%OS_VERSION%.repo + - https://copr.fedorainfracloud.org/coprs/szydell/system76/repo/fedora-%OS_VERSION%/szydell-system76-fedora-%OS_VERSION%.repo + - https://copr.fedorainfracloud.org/coprs/ublue-os/staging/repo/fedora-%OS_VERSION%/ublue-os-staging-fedora-%OS_VERSION%.repo + +install: + - gnome-shell-extension-caffeine + - system76-scheduler + - gnome-shell-extension-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-plugins + - podman-tui + - podmansh + - playerctl + - nautilus-gsconnect + - gnome-shell-extension-gsconnect + - python3-pip + - samba + - samba-dcerpc + - samba-ldb-ldap-modules + - samba-winbind-clients + - samba-winbind-modules + - konsole + - libvirt + +remove: + - firefox + - firefox-langpacks + - htop + - nvtop + - gnome-software-rpm-ostree + - gnome-tour + - gnome-initial-setup + - gnome-system-monitor + - gnome-classic-session + - gnome-extensions-app + +type: bling +install: + - dconf-update-service + - ublue-os-wallpapers + - ublue-update + - container-tools + +type: yafti +custom-flatpaks: + +type: default-flatpaks +notify: true +system: + repo-url: https://dl.flathub.org/repo/flathub.flatpakrepo + repo-name: flathub-system + repo-title: "Flathub (System)" # Optional; this sets the remote's user-facing name in graphical frontends like GNOME Software + install: + - org.gnome.Calculator + - org.gnome.Calendar + - org.gnome.Snapshot + - org.gnome.Contacts + - org.gnome.clocks + - org.gnome.Evince + - org.gnome.Maps + - org.gnome.TextEditor + - com.github.neithern.g4music + - com.github.rafostar.Clapper + - org.gnome.Loupe + - io.missioncenter.MissionCenter + - com.vixalien.sticky + - com.github.tchx84.Flatseal + - io.github.fabrialberio.pinapp + - com.mattjakeman.ExtensionManager + - io.podman_desktop.PodmanDesktop + - com.uploadedlobster.peek + - org.mozilla.firefox +user: + repo-url: https://dl.flathub.org/repo/flathub.flatpakrepo + repo-name: flathub-user + repo-title: "Flathub" + +type: systemd +system: + enabled: + - initramfs-setup.service + - minimum-free-zram.service + - com.system76.PowerDaemon.service + - system76-power-wake.service + - com.system76.Scheduler.service + masked: + - power-profiles-daemon.service +user: + enabled: + - podman.socket + - docker.socket + +type: script +scripts: + - system76-scheduler.sh + - signing.sh \ No newline at end of file diff --git a/config/files/etc/yum.repos.d/docker-ce.repo b/config/files/etc/yum.repos.d/docker-ce.repo new file mode 100644 index 0000000..8a0de16 --- /dev/null +++ b/config/files/etc/yum.repos.d/docker-ce.repo @@ -0,0 +1,6 @@ +[docker-ce-stable] +name=Docker CE Stable - $basearch +baseurl=https://download.docker.com/linux/fedora/$releasever/$basearch/stable +enabled=1 +gpgcheck=1 +gpgkey=https://download.docker.com/linux/fedora/gpg diff --git a/config/files/etc/yum.repos.d/vscode.repo b/config/files/etc/yum.repos.d/vscode.repo new file mode 100644 index 0000000..086c915 --- /dev/null +++ b/config/files/etc/yum.repos.d/vscode.repo @@ -0,0 +1,6 @@ +[code] +name=Visual Studio Code +baseurl=https://packages.microsoft.com/yumrepos/vscode +enabled=1 +gpgcheck=1 +gpgkey=https://packages.microsoft.com/keys/microsoft.asc diff --git a/config/files/usr/bin/dx-groups b/config/files/usr/bin/dx-groups new file mode 100755 index 0000000..c866049 --- /dev/null +++ b/config/files/usr/bin/dx-groups @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +# SCRIPT VERSION +GROUP_SETUP_VER=1 +GROUP_SETUP_VER_FILE="/etc/ublue/dx-groups" +GROUP_SETUP_VER_RAN=$(cat "$GROUP_SETUP_VER_FILE") + +# Run script if updated +if [[ -f $GROUP_SETUP_VER_FILE && "$GROUP_SETUP_VER" = "$GROUP_SETUP_VER_RAN" ]]; then + echo "Group setup has already run. Exiting..." + exit 0 +fi + +# Setup Groups +wheelarray=($(getent group wheel | cut -d ":" -f 4 | tr ',' '\n')) +for user in $wheelarray +do + usermod -aG docker $user + usermod -aG libvirt $user +done + +# Prevent future executions +echo "Writing state file" +echo "$GROUP_SETUP_VER" > "$GROUP_SETUP_VER_FILE" diff --git a/config/files/usr/bin/dx-user-vscode b/config/files/usr/bin/dx-user-vscode new file mode 100755 index 0000000..013becd --- /dev/null +++ b/config/files/usr/bin/dx-user-vscode @@ -0,0 +1,40 @@ +#!/usr/bin/env bash + +# SCRIPT VERSION +USER_SETUP_VER=2 +USER_SETUP_VER_FILE="${XDG_DATA_HOME:-$HOME/.local/share}/ublue/vscode-configured" +USER_SETUP_VER_RAN=$(cat "$USER_SETUP_VER_FILE") + +mkdir -p "$(dirname "$USER_SETUP_VER_FILE")" || exit 1 + +USER_SETUP_VER_FILE_V1="$HOME/.bluefin-vscode-configured" +# Upgrade from v1 to v2 changes only the location of the USER_SETUP_VER. +# Exit if v1 file is present. +if [[ -f $USER_SETUP_VER_FILE_V1 ]]; then + echo "User setup v1 has already run. Exiting..." + rm $USER_SETUP_VER_FILE_V1 + echo "$USER_SETUP_VER" > "$USER_SETUP_VER_FILE" + exit 0 +fi + +# Run script if updated +if [[ -f $USER_SETUP_VER_FILE && "$USER_SETUP_VER" = "$USER_SETUP_VER_RAN" ]]; then + echo "User setup v$VER has already run. Exiting..." + exit 0 +fi + +# Setup VSCode +# Pre-install preferred VSCode Extensions +code --install-extension ms-vscode-remote.remote-containers +code --install-extension ms-azuretools.vscode-docker +code --install-extention trongthanh.theme-boxythemekit +code --install-extention EditorConfig.EditorConfig +code --install-extention dbaeumer.vscode-eslint +code --install-extention drKnoxy.eslint-disable-snippets +code --install-extention eamodio.gitlens +code --install-extention esbenp.prettier-vscode +code --install-extention ms-vscode-remote.remote-ssh + +# Prevent future executions +echo "Writing state file" +echo "$USER_SETUP_VER" > "$USER_SETUP_VER_FILE" diff --git a/config/files/usr/bin/initramfs-setup b/config/files/usr/bin/initramfs-setup new file mode 100755 index 0000000..27c1690 --- /dev/null +++ b/config/files/usr/bin/initramfs-setup @@ -0,0 +1,113 @@ +#!/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" +custom_tracked_file="/etc/ublue-os/initramfs/tracked-custom" +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") +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 + +# 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 + found=true + break + fi + done + if ! $found; then + applies_tracking=true + fi +done + +# If there are file arguments in current initramfs, that are not present in needed initramfs, make them ready for untracking +for current_arg in "${current[@]}"; do + found=false + for needed_arg in "${needed[@]}"; do + if [[ "$needed_arg" == "$current_arg" ]]; then + found=true + break + fi + done + if ! $found; then + applies_untracking=true + untracked+=("$current_arg") + fi +done + +# 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 + 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 + 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 + 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 + 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 + rpm-ostree initramfs-etc "${tracked_args[@]}" --force-sync --reboot + elif ! $applies_tracking && $applies_untracking && $applies_dracut; 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 + rpm-ostree initramfs-etc "${untracked_args[@]}" --force-sync --reboot + elif $applies_tracking && $applies_untracking && $applies_dracut; 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 + 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 +else + echo "No initramfs & dracut changes detected" +fi diff --git a/config/files/usr/bin/minimum-free-zram b/config/files/usr/bin/minimum-free-zram new file mode 100755 index 0000000..f1966a2 --- /dev/null +++ b/config/files/usr/bin/minimum-free-zram @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +minimum_free_zram=$(awk '/MemTotal/ {printf "%.0f", $2 * 0.01}' /proc/meminfo) +current_free_zram=$(sysctl vm.min_free_kbytes | awk '{print $3}') + +# Minimum-free ZRAM +printf "Current minimum-free ZRAM value: %s\n" "$current_free_zram" + +if ((minimum_free_zram > current_free_zram)); then + sysctl -w "vm.min_free_kbytes=${minimum_free_zram}" + printf "Found needed minimum-free ZRAM changes, applying the following: %s\n" "$minimum_free_zram" +else + echo "No minimum-free ZRAM changes needed" +fi + diff --git a/config/files/usr/bin/system-flatpak-setup b/config/files/usr/bin/system-flatpak-setup new file mode 100755 index 0000000..8809bee --- /dev/null +++ b/config/files/usr/bin/system-flatpak-setup @@ -0,0 +1,94 @@ +#!/usr/bin/env bash + +# Opt out of and remove Fedora's flatpak repo +if grep -qz 'fedora' <<< "$(flatpak remotes)"; then + /usr/bin/gnome-software --quit + /usr/lib/fedora-third-party/fedora-third-party-opt-out + /usr/bin/fedora-third-party disable + flatpak remote-delete fedora --force + flatpak remote-delete fedora-testing --force + + # Remove flatpak apps from origin fedora + FEDORA_FLATPAKS=$(flatpak list --app --columns=application,origin | grep -w 'fedora' | awk '{print $1}') + flatpak remove --system --noninteractive ${FEDORA_FLATPAKS[@]} + + # Remove flatpak runtimes from origin fedora + FEDORA_FLATPAKS=$(flatpak list --runtime --columns=application,arch,branch,origin | grep -w 'fedora' | awk '{print $1"/"$2"/"$3}') + flatpak remove --system --noninteractive ${FEDORA_FLATPAKS[@]} +fi + +REPO_INFO="/etc/flatpak/system/repo-info.yml" +REPO_URL=$(yq '.repo-url' $REPO_INFO) +REPO_NAME=$(yq '.repo-name' $REPO_INFO) +REPO_TITLE=$(yq '.repo-title' $REPO_INFO) + +# Set up system-wide Flatpak repository +if [[ ! $REPO_URL == "null" && ! $REPO_NAME == "null" ]]; then + flatpak remote-add --if-not-exists --system "$REPO_NAME" "$REPO_URL" + echo "Adding system-wide remote $REPO_NAME from $REPO_URL" +fi + +# If configured remote is flathub, enable it here. +# Flathub is already installed on Fedora, but not enabled by default, +# so the above command won't add it again +if [[ $REPO_NAME == "flathub" ]]; then + flatpak remote-modify --system "$REPO_NAME" --enable +fi + +# Change repository title to configured title, if not null +if [[ ! $REPO_TITLE == "null" ]]; then + flatpak remote-modify --system "$REPO_NAME" --title="$REPO_TITLE" + echo "Setting title $REPO_TITLE for remote $REPO_NAME" +fi + +# Notifications config +NOTIFICATIONS=$(cat /etc/flatpak/notifications) + +# Installed flatpaks +FLATPAK_LIST=$(flatpak list --system --columns=application) + +# Flatpak list files +INSTALL_LIST_FILE="/etc/flatpak/system/install" +REMOVE_LIST_FILE="/etc/flatpak/system/remove" + +function notify-send-install { + user_name=$(loginctl list-sessions --output=json | jq -r '.[].user') + uid=$(loginctl list-sessions --output=json | jq -r '.[].uid') + xdg_runtime_path="/run/user/$uid" + display_var=$(printenv DISPLAY) + sudo -u "$user_name" DBUS_SESSION_BUS_ADDRESS=unix:path="$xdg_runtime_path"/bus DISPLAY="$display_var" notify-send "Flatpak Installer" "Finished install of system flatpaks:\n$INSTALL_LIST" --app-name="Flatpak Installer" -u NORMAL +} + +function notify-send-uninstall { + user_name=$(loginctl list-sessions --output=json | jq -r '.[].user') + uid=$(loginctl list-sessions --output=json | jq -r '.[].uid') + xdg_runtime_path="/run/user/$uid" + display_var=$(printenv DISPLAY) + sudo -u "$user_name" DBUS_SESSION_BUS_ADDRESS=unix:path="$xdg_runtime_path"/bus DISPLAY="$display_var" notify-send "Flatpak Installer" "Finished uninstall of system flatpaks:\n$REMOVE_LIST" --app-name="Flatpak Installer" -u NORMAL +} + +# Install flatpaks in list +if [[ -f $INSTALL_LIST_FILE ]]; then + if [[ -n $FLATPAK_LIST ]]; then + INSTALL_LIST=$(echo "$FLATPAK_LIST" | grep -vf - "$INSTALL_LIST_FILE") + else + INSTALL_LIST=$(cat $INSTALL_LIST_FILE) + fi + if [[ -n $INSTALL_LIST ]]; then + flatpak install --system --noninteractive "$REPO_NAME" ${INSTALL_LIST[@]} + if [[ $NOTIFICATIONS == "true" ]]; then + notify-send-install + fi + fi +fi + +# Remove flatpaks in list +if [[ -f $REMOVE_LIST_FILE ]]; then + REMOVE_LIST=$(echo "$FLATPAK_LIST" | grep -o -f - "$REMOVE_LIST_FILE") + if [[ -n $REMOVE_LIST ]]; then + flatpak uninstall --system --noninteractive ${REMOVE_LIST[@]} + if [[ $NOTIFICATIONS == "true" ]]; then + notify-send-uninstall + fi + fi +fi diff --git a/config/files/usr/etc/dconf/db/gdm.d/01-gidro b/config/files/usr/etc/dconf/db/gdm.d/01-gidro new file mode 100644 index 0000000..72eb2cd --- /dev/null +++ b/config/files/usr/etc/dconf/db/gdm.d/01-gidro @@ -0,0 +1,2 @@ +[org/gnome/desktop/peripherals/touchpad] +tap-to-click=true diff --git a/config/files/usr/etc/dconf/db/local.d/01-gnome-settings b/config/files/usr/etc/dconf/db/local.d/01-gnome-settings new file mode 100644 index 0000000..75a4d87 --- /dev/null +++ b/config/files/usr/etc/dconf/db/local.d/01-gnome-settings @@ -0,0 +1,42 @@ +[org/gnome/shell] +favorite-apps = ['org.mozilla.firefox.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop', 'code.desktop'] + +[org/gnome/mutter] +workspaces-only-on-primary = false +dynamic-workspaces = false + +[org/gnome/shell/app-switcher] +current-workspace-only = false + +[org/gnome/desktop/wm/preferences] +num-workspaces = 4 + +[org/gnome/desktop/wm/keybindings] +switch-to-workspace-left = ['Left'] +switch-to-workspace-right = ['Right'] + +[org/gnome/settings-daemon/plugins/media-keys] +next = ['period'] +play = ['slash'] +previous = ['comma'] + +[org/gnome/desktop/peripherals/touchpad] +two-finger-scrolling-enabled = true +natural-scroll = false +tap-to-click = true + +[org/gnome/desktop/background] +picture-options='zoom' +picture-uri='file:///usr/share/backgrounds/RockyMountain/RockyMountain1.jpg' +picture-uri-dark='file:///usr/share/backgrounds/RockyMountain/RockyMountain2.jpg' +primary-color='3465a4' +secondary-color='000000' + +[org/gnome/settings-daemon/plugins/color] +night-light-enabled = true + +[org/gnome/desktop/interface] +text-scaling-factor = 1.25 + +[org/gnome/mutter] +experimental-features=['scale-monitor-framebuffer'] \ No newline at end of file diff --git a/config/files/usr/etc/dconf/profile/gdm b/config/files/usr/etc/dconf/profile/gdm new file mode 100644 index 0000000..817afc5 --- /dev/null +++ b/config/files/usr/etc/dconf/profile/gdm @@ -0,0 +1,3 @@ +user-db:user +system-db:gdm +file-db:/usr/share/gdm/greeter-dconf-defaults diff --git a/config/files/usr/etc/dconf/profile/user b/config/files/usr/etc/dconf/profile/user new file mode 100644 index 0000000..aca0641 --- /dev/null +++ b/config/files/usr/etc/dconf/profile/user @@ -0,0 +1,2 @@ +user-db:user +system-db:local diff --git a/config/files/usr/etc/modprobe.d/modprobe-custom.conf b/config/files/usr/etc/modprobe.d/modprobe-custom.conf new file mode 100644 index 0000000..8d442ce --- /dev/null +++ b/config/files/usr/etc/modprobe.d/modprobe-custom.conf @@ -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 diff --git a/config/files/usr/etc/profile.d/vscode-profile.sh b/config/files/usr/etc/profile.d/vscode-profile.sh new file mode 100644 index 0000000..8cd7094 --- /dev/null +++ b/config/files/usr/etc/profile.d/vscode-profile.sh @@ -0,0 +1,7 @@ +if test "$(id -u)" -gt "0" && test -d "$HOME"; then + # Add default settings when there are no settings + if test ! -e "$HOME"/.config/Code/User/settings.json; then + mkdir -p "$HOME"/.config/Code/User + cp -f /etc/skel.d/.config/Code/User/settings.json "$HOME"/.config/Code/User/settings.json + fi +fi diff --git a/config/files/usr/etc/skel.d/.config/Code/User/settings.json b/config/files/usr/etc/skel.d/.config/Code/User/settings.json new file mode 100644 index 0000000..59a41dd --- /dev/null +++ b/config/files/usr/etc/skel.d/.config/Code/User/settings.json @@ -0,0 +1,52 @@ +{ + "workbench.colorCustomizations": { + "sideBar.background": "#3c4c55cc", + "activityBar.background": "#3c4c55", + "activityBar.foreground": "#fff", + "activityBarBadge.background": "#ec5f67cc" + }, + "editor.fontLigatures": true, + "editor.fontFamily": "FiraCode Nerd Font", + "editor.tabSize": 2, + "telemetry.telemetryLevel": "off", + "workbench.colorTheme": "Boxy Nova", + "files.trimTrailingWhitespace": true, + "extensions.ignoreRecommendations": false, + "git.confirmSync": false, + "editor.minimap.showSlider": "always", + "editor.formatOnPaste": true, + "editor.multiCursorModifier": "alt", + "files.exclude": { + "/.DS_Store": true, + "/.git": true, + "/.hg": true, + "/.svn": true, + "/*.min.*": true, + "/CVS": true, + "/dist": true, + "**/jquery*": true + }, + "git.autofetch": true, + "update.mode": "none", + "editor.fontSize": 16, + "security.workspace.trust.untrustedFiles": "open", + "git.mergeEditor": false, + "workbench.startupEditor": "none", + "[javascriptreact]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[typescript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[typescriptreact]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "javascript.updateImportsOnFileMove.enabled": "never", + "[javascript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[json]": { + "editor.defaultFormatter": "vscode.json-language-features" + }, + "diffEditor.codeLens": true +} diff --git a/config/files/usr/etc/sysctl.d/10-kernel-gidro.conf b/config/files/usr/etc/sysctl.d/10-kernel-gidro.conf new file mode 100644 index 0000000..a35bea0 --- /dev/null +++ b/config/files/usr/etc/sysctl.d/10-kernel-gidro.conf @@ -0,0 +1,10 @@ +# Disable kernel watchdogs +kernel.watchdog=0 +kernel.nmi_watchdog=0 +kernel.soft_watchdog=0 + +# Disable split lock mitigate (prevents certain games performance drop) +kernel.split_lock_mitigate=0 + +# Disable most kernel logs, but still show the important ones +kernel.printk = 3 3 3 3 diff --git a/config/files/usr/etc/sysctl.d/20-memory-gidro.conf b/config/files/usr/etc/sysctl.d/20-memory-gidro.conf new file mode 100644 index 0000000..a7b25c5 --- /dev/null +++ b/config/files/usr/etc/sysctl.d/20-memory-gidro.conf @@ -0,0 +1,15 @@ +# ZRAM tweaks (PopOS defaults) +vm.swappiness=180 +vm.watermark_boost_factor=0 +vm.watermark_scale_factor=125 +vm.page-cluster=0 + +# Prevent long file transfer OOM +vm.dirty_bytes=268435456 +vm.dirty_background_bytes=134217728 + +# Increase memory maps (SteamOS default) +vm.max_map_count=2147483642 + +# Disable core dump +kernel.core_pattern=|/bin/false diff --git a/config/files/usr/etc/sysctl.d/30-networking-gidro.conf b/config/files/usr/etc/sysctl.d/30-networking-gidro.conf new file mode 100644 index 0000000..cd61c4f --- /dev/null +++ b/config/files/usr/etc/sysctl.d/30-networking-gidro.conf @@ -0,0 +1,3 @@ +# Use BBR TCP & FQ packet scheduler +net.core.default_qdisc=fq +net.ipv4.tcp_congestion_control=bbr diff --git a/config/files/usr/etc/sysctl.d/40-inotify-gidro.conf b/config/files/usr/etc/sysctl.d/40-inotify-gidro.conf new file mode 100644 index 0000000..984e27b --- /dev/null +++ b/config/files/usr/etc/sysctl.d/40-inotify-gidro.conf @@ -0,0 +1,2 @@ +fs.inotify.max_user_instances=8192 +fs.inotify.max_user_watches=524288 diff --git a/config/files/usr/lib/sysctl.d/docker-ce.conf b/config/files/usr/lib/sysctl.d/docker-ce.conf new file mode 100644 index 0000000..4234b54 --- /dev/null +++ b/config/files/usr/lib/sysctl.d/docker-ce.conf @@ -0,0 +1 @@ +net.ipv4.ip_forward = 1 diff --git a/config/files/usr/lib/systemd/system/dx-groups.service b/config/files/usr/lib/systemd/system/dx-groups.service new file mode 100644 index 0000000..58c80a6 --- /dev/null +++ b/config/files/usr/lib/systemd/system/dx-groups.service @@ -0,0 +1,12 @@ +[Unit] +Description=Add wheel members to docker + +[Service] +Type=oneshot +ExecStart=/usr/bin/dx-groups +Restart=on-failure +RestartSec=30 +StartLimitInterval=0 + +[Install] +WantedBy=default.target \ No newline at end of file diff --git a/config/files/usr/lib/systemd/system/initramfs-setup.service b/config/files/usr/lib/systemd/system/initramfs-setup.service new file mode 100644 index 0000000..6e7ba91 --- /dev/null +++ b/config/files/usr/lib/systemd/system/initramfs-setup.service @@ -0,0 +1,12 @@ +[Unit] +Description=Configure initramfs setup +After=rpm-ostreed.service +Before=systemd-user-sessions.service + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/initramfs-setup + +[Install] +WantedBy=multi-user.target diff --git a/config/files/usr/lib/systemd/system/minimum-free-zram.service b/config/files/usr/lib/systemd/system/minimum-free-zram.service new file mode 100644 index 0000000..0395ff6 --- /dev/null +++ b/config/files/usr/lib/systemd/system/minimum-free-zram.service @@ -0,0 +1,12 @@ +[Unit] +Description=Minimum-free ZRAM setup +After=initramfs-setup.service +Before=systemd-user-sessions.service + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/minimum-free-zram + +[Install] +WantedBy=multi-user.target diff --git a/config/files/usr/lib/systemd/system/system-flatpak-setup.service b/config/files/usr/lib/systemd/system/system-flatpak-setup.service new file mode 100644 index 0000000..d505448 --- /dev/null +++ b/config/files/usr/lib/systemd/system/system-flatpak-setup.service @@ -0,0 +1,14 @@ +[Unit] +Description=Manage system flatpaks +Wants=network-online.target +After=network-online.target + +[Service] +Type=oneshot +ExecStart=/usr/bin/system-flatpak-setup +Restart=on-failure +RestartSec=30 +StartLimitInterval=0 + +[Install] +WantedBy=multi-user.target diff --git a/config/files/usr/lib/systemd/user/dx-user-vscode.service b/config/files/usr/lib/systemd/user/dx-user-vscode.service new file mode 100644 index 0000000..41d11db --- /dev/null +++ b/config/files/usr/lib/systemd/user/dx-user-vscode.service @@ -0,0 +1,14 @@ +[Unit] +Description=Run +Wants=network-online.target +After=network-online.target ublue-user-setup.service + +[Service] +Type=oneshot +ExecStart=/usr/bin/dx-user-vscode +Restart=on-failure +RestartSec=30 +StartLimitInterval=0 + +[Install] +WantedBy=default.target \ No newline at end of file diff --git a/config/files/usr/lib/systemd/zram-generator.conf.d/zram-generator.conf b/config/files/usr/lib/systemd/zram-generator.conf.d/zram-generator.conf new file mode 100644 index 0000000..f081304 --- /dev/null +++ b/config/files/usr/lib/systemd/zram-generator.conf.d/zram-generator.conf @@ -0,0 +1,3 @@ +[zram0] +zram-size=min(ram, 16384) +compression-algorithm=zstd diff --git a/config/files/usr/share/backgrounds/RockyMountain/RockyMountain1.jpg b/config/files/usr/share/backgrounds/RockyMountain/RockyMountain1.jpg new file mode 100644 index 0000000..c190283 Binary files /dev/null and b/config/files/usr/share/backgrounds/RockyMountain/RockyMountain1.jpg differ diff --git a/config/files/usr/share/backgrounds/RockyMountain/RockyMountain2.jpg b/config/files/usr/share/backgrounds/RockyMountain/RockyMountain2.jpg new file mode 100644 index 0000000..a87d9e4 Binary files /dev/null and b/config/files/usr/share/backgrounds/RockyMountain/RockyMountain2.jpg differ diff --git a/config/scripts/system76-scheduler.sh b/config/scripts/system76-scheduler.sh new file mode 100644 index 0000000..bd84eb0 --- /dev/null +++ b/config/scripts/system76-scheduler.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +# Tell build process to exit if there are any errors. +set -euo pipefail + +mkdir -p /usr/etc/system76-scheduler +wget https://raw.githubusercontent.com/ublue-os/bazzite/main/system_files/desktop/shared/usr/etc/system76-scheduler/config.kdl -O /usr/etc/system76-scheduler/config.kdl