-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from AdamIsrael/profiles
Introducing Profiles
- Loading branch information
Showing
6 changed files
with
96 additions
and
22 deletions.
There are no files selected for viewing
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
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,11 @@ | ||
# Profiles | ||
|
||
Profiles are a collection of scripts that will configure layered packages to enable certain functionality or configure your desktop/environment in specific ways. | ||
|
||
|
||
| Profile | Description | | ||
| ------- | ----------- | | ||
| tailscale | Install the Tailscale VPN (https://tailscale.com/) | | ||
| vscode | Instal Visual Studio Code | | ||
| yaru | Install the Yaru theme | | ||
| yaru-dark | Install the Yaru-dark theme | |
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,24 @@ | ||
#!/bin/bash | ||
# Install tailscale | ||
|
||
set -eu | ||
|
||
if [ ! -e /etc/yum.repos.d/tailscale.repo ]; then | ||
echo "Installing repo..." | ||
sudo curl -s https://pkgs.tailscale.com/stable/fedora/tailscale.repo -o /etc/yum.repos.d/tailscale.repo > /dev/null | ||
fi | ||
|
||
# Check if tailscale is already installed | ||
rpm -q tailscale > /dev/null | ||
if [ $? -eq 1 ]; then | ||
echo "Installing tailscale package..." | ||
rpm-ostree install tailscale | ||
echo "Please reboot to finish installation of the layered package and re-run this script to enable tailscale." | ||
exit 0 | ||
fi | ||
|
||
echo "Enabling tailscale (systemd)..." | ||
sudo systemctl enable --now tailscaled > /dev/null | ||
|
||
echo "Starting tailscale..." | ||
sudo tailscale up |
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,29 @@ | ||
#!/bin/bash | ||
# Install vscode as an overlay so it can access the host terminal | ||
# This is hopefully a temporary workaround until the flatpak can | ||
# access the system/toolbox environments without ugly hacks. | ||
set -eu | ||
|
||
# Disclaimer | ||
echo "This profile will remove the VSCode flatpak in favor of an overlayed package, in order to enable access to the host terminal. This is a temporary workaround until the flatpak can access the system/toolbox environment without ugly hacks." | ||
echo "" | ||
echo "Press any key to continue, or control-c to exit" | ||
read -n1 -s | ||
|
||
|
||
# if the flatpak is installed, remove it | ||
if grep -q "com.visualstudio.code" <<< `flatpak list --app --columns=application`; then | ||
echo "Removing Visual Studio Code flatpak..." | ||
flatpak uninstall -y com.visualstudio.code | ||
fi | ||
rpm -q code > /dev/null | ||
if [ $? -eq 1 ]; then | ||
echo "Installing Visual Studio Code as an overlay package..." | ||
sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo' | ||
rpm-ostree install code | ||
echo "Please reboot to finish installation of the layered package." | ||
exit 0 | ||
else | ||
echo "Visual Studio Code overlay is already installed." | ||
fi |
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 @@ | ||
#!/bin/bash | ||
# Install the Yaru theme | ||
set -eu | ||
|
||
|
||
# Check if yaru-theme is already installed | ||
rpm -q yaru-theme > /dev/null | ||
if [ $? -eq 1 ]; then | ||
echo "Installing yaru theme package..." | ||
rpm-ostree install yaru-theme | ||
echo "Please reboot to finish installation of the layered package and re-run this script to enable Yaru." | ||
exit 0 | ||
fi | ||
|
||
gsettings set org.gnome.desktop.interface gtk-theme "Yaru" | ||
gsettings set org.gnome.desktop.interface icon-theme "Yaru" | ||
gsettings set org.gnome.desktop.sound theme-name "Yaru" |
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,15 @@ | ||
#!/bin/bash | ||
# Install the Yaru (dark) theme | ||
set -eu | ||
|
||
rpm -q yaru-theme > /dev/null | ||
if [ $? -eq 1 ]; then | ||
echo "Installing yaru theme package..." | ||
rpm-ostree install yaru-theme | ||
echo "Please reboot to finish installation of the layered package and re-run this script to enable Yaru-dark." | ||
exit 0 | ||
fi | ||
|
||
gsettings set org.gnome.desktop.interface gtk-theme "Yaru-dark" | ||
gsettings set org.gnome.desktop.interface icon-theme "Yaru" | ||
gsettings set org.gnome.desktop.sound theme-name "Yaru" |