Move to files/
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="2dc8", ATTR{idProduct}=="3106", ATTR{manufacturer}=="8BitDo", RUN+="/usr/bin/systemctl start 8bitdo-ultimate-xinput@2dc8:3106"
|
||||
|
||||
# This device is connected when the above device disconnects
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="2dc8", ATTR{idProduct}=="3109", ATTR{manufacturer}=="8BitDo", RUN+="/usr/bin/systemctl stop 8bitdo-ultimate-xinput@2dc8:3106"
|
||||
@@ -0,0 +1,6 @@
|
||||
[Unit]
|
||||
Description=8BitDo Ultimate Controller XInput Mode Xbobxdrv Daemon
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/xboxdrv --mimic-xpad --silent --type xbox360 --device-by-id %I --force-feedback
|
||||
@@ -0,0 +1,3 @@
|
||||
# This file was added by the program 'hda-jack-retask'.
|
||||
# If you want to revert the changes made by this program, you can simply erase this file and reboot your computer.
|
||||
options snd-hda-intel patch=hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-retask.fw
|
||||
14
files/files/desktop-audio/lib/firmware/hda-jack-retask.fw
Normal file
14
files/files/desktop-audio/lib/firmware/hda-jack-retask.fw
Normal file
@@ -0,0 +1,14 @@
|
||||
[codec]
|
||||
0x10ec0b00 0x10438797 0
|
||||
|
||||
[pincfg]
|
||||
0x11 0x411111f0
|
||||
0x14 0x01014010
|
||||
0x15 0x01011012
|
||||
0x16 0x01016011
|
||||
0x17 0x40170000
|
||||
0x18 0x01a19050
|
||||
0x19 0x02a19060
|
||||
0x1a 0x0181305f
|
||||
0x1b 0x01014010
|
||||
0x1e 0x01456140
|
||||
15
files/files/distrobox/etc/distrobox/distrobox.ini
Normal file
15
files/files/distrobox/etc/distrobox/distrobox.ini
Normal file
@@ -0,0 +1,15 @@
|
||||
[ubuntu]
|
||||
image=ghcr.io/ublue-os/ubuntu-toolbox:latest
|
||||
init=false
|
||||
nvidia=false
|
||||
pull=true
|
||||
root=false
|
||||
replace=true
|
||||
|
||||
[fedora]
|
||||
image=registry.fedoraproject.org/fedora-toolbox:latest
|
||||
init=false
|
||||
nvidia=false
|
||||
pull=true
|
||||
root=false
|
||||
replace=true
|
||||
48
files/files/framework-13/etc/systemd/system/frpintd.service
Normal file
48
files/files/framework-13/etc/systemd/system/frpintd.service
Normal file
@@ -0,0 +1,48 @@
|
||||
[Unit]
|
||||
Description=Fingerprint Authentication Daemon
|
||||
Documentation=man:fprintd(1)
|
||||
|
||||
[Service]
|
||||
Type=dbus
|
||||
BusName=net.reactivated.Fprint
|
||||
ExecStart=/usr/libexec/fprintd
|
||||
|
||||
# Filesystem lockdown
|
||||
ProtectSystem=strict
|
||||
ProtectKernelTunables=true
|
||||
ProtectKernelLogs=true
|
||||
ProtectControlGroups=true
|
||||
# This always corresponds to /var/lib/fprint
|
||||
StateDirectory=fprint
|
||||
StateDirectoryMode=0700
|
||||
ProtectHome=true
|
||||
PrivateTmp=true
|
||||
|
||||
SystemCallFilter=@system-service
|
||||
|
||||
# Network
|
||||
RestrictAddressFamilies=AF_UNIX AF_LOCAL AF_NETLINK
|
||||
|
||||
# Execute Mappings
|
||||
MemoryDenyWriteExecute=true
|
||||
|
||||
# Modules
|
||||
ProtectKernelModules=true
|
||||
|
||||
# Real-time
|
||||
RestrictRealtime=true
|
||||
|
||||
# Privilege escalation
|
||||
NoNewPrivileges=true
|
||||
|
||||
# Protect clock, allow USB and SPI device access
|
||||
ProtectClock=yes
|
||||
DeviceAllow=char-usb_device rw
|
||||
DeviceAllow=char-spi rw
|
||||
DeviceAllow=char-hidraw rw
|
||||
|
||||
# Allow tuning USB parameters (wakeup and persist)
|
||||
ReadWritePaths=/sys/devices
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
134
files/files/framework-13/etc/tlp.d/50-framework.conf
Normal file
134
files/files/framework-13/etc/tlp.d/50-framework.conf
Normal file
@@ -0,0 +1,134 @@
|
||||
# ------------------------------------------------------------------------------
|
||||
# /etc/tlp.conf - TLP user configuration (version 1.4)
|
||||
# See full explanation: https://linrunner.de/tlp/settings
|
||||
#
|
||||
# Settings are read in the following order:
|
||||
#
|
||||
# 1. Intrinsic defaults
|
||||
# 2. /etc/tlp.d/*.conf - Drop-in customization snippets
|
||||
# 3. /etc/tlp.conf - User configuration (this file)
|
||||
#
|
||||
# Notes:
|
||||
# - In case of identical parameters, the last occurence has precedence
|
||||
# - This also means, parameters enabled here will override anything else
|
||||
# - However you may append values to a parameter already defined as intrinsic
|
||||
# default or in a previously read file: use PARAMETER+="add values"
|
||||
# - IMPORTANT: all parameters here are disabled; remove the leading '#' if you
|
||||
# like to enable a feature without default or have a value different from the
|
||||
# default
|
||||
# - Default *: intrinsic default that is effective when the parameter is missing
|
||||
# or disabled by a leading '#'; use PARAM="" to disable an intrinsic default
|
||||
# - Default <none>: do nothing or use kernel/hardware defaults
|
||||
# -
|
||||
# ------------------------------------------------------------------------------
|
||||
# tlp - Parameters for power saving
|
||||
#
|
||||
# Settings based on Framework's guidance: https://knowledgebase.frame.work/en_us/optimizing-fedora-battery-life-r1baXZh
|
||||
|
||||
# Select a CPU frequency scaling governor.
|
||||
# Intel processor with intel_pstate driver:
|
||||
# performance, powersave(*).
|
||||
# Intel processor with intel_cpufreq driver (aka intel_pstate passive mode):
|
||||
# conservative, ondemand, userspace, powersave, performance, schedutil(*).
|
||||
# Intel and other processor brands with acpi-cpufreq driver:
|
||||
# conservative, ondemand(*), userspace, powersave, performance, schedutil(*).
|
||||
# Use tlp-stat -p to show the active driver and available governors.
|
||||
# Important:
|
||||
# Governors marked (*) above are power efficient for *almost all* workloads
|
||||
# and therefore kernel and most distributions have chosen them as defaults.
|
||||
# You should have done your research about advantages/disadvantages *before*
|
||||
# changing the governor.
|
||||
# Default: <none>
|
||||
|
||||
CPU_SCALING_GOVERNOR_ON_AC=performance
|
||||
CPU_SCALING_GOVERNOR_ON_BAT=powersave
|
||||
|
||||
# Set Intel CPU energy/performance policies HWP.EPP and EPB:
|
||||
# performance, balance_performance, default, balance_power, power.
|
||||
# Values are given in order of increasing power saving.
|
||||
# Notes:
|
||||
# - HWP.EPP: requires kernel 4.10, intel_pstate scaling driver and Intel Core i
|
||||
# 6th gen. or newer CPU
|
||||
# - EPB: requires kernel 5.2 or module msr and x86_energy_perf_policy from
|
||||
# linux-tools, intel_pstate or intel_cpufreq scaling driver and Intel Core i
|
||||
# 2nd gen. or newer CPU
|
||||
# - When HWP.EPP is available, EPB is not set
|
||||
# Default: balance_performance (AC), balance_power (BAT)
|
||||
|
||||
CPU_ENERGY_PERF_POLICY_ON_AC=performance
|
||||
CPU_ENERGY_PERF_POLICY_ON_BAT=power
|
||||
|
||||
# Set Intel CPU P-state performance: 0..100 (%).
|
||||
# Limit the max/min P-state to control the power dissipation of the CPU.
|
||||
# Values are stated as a percentage of the available performance.
|
||||
# Requires intel_pstate or intel_cpufreq driver and Intel Core i 2nd gen. or
|
||||
# newer CPU.
|
||||
# Default: <none>
|
||||
|
||||
CPU_MIN_PERF_ON_AC=0
|
||||
CPU_MAX_PERF_ON_AC=100
|
||||
CPU_MIN_PERF_ON_BAT=0
|
||||
CPU_MAX_PERF_ON_BAT=30
|
||||
|
||||
# Set the CPU "turbo boost" (Intel) or "turbo core" (AMD) feature:
|
||||
# 0=disable, 1=allow.
|
||||
# Note: a value of 1 does *not* activate boosting, it just allows it.
|
||||
# Default: <none>
|
||||
|
||||
CPU_BOOST_ON_AC=1
|
||||
CPU_BOOST_ON_BAT=0
|
||||
|
||||
# Set the Intel CPU HWP dynamic boost feature:
|
||||
# 0=disable, 1=enable.
|
||||
# Requires intel_pstate scaling driver in 'active' mode and Intel Core i
|
||||
# 6th gen. or newer CPU.
|
||||
# Default: <none>
|
||||
|
||||
CPU_HWP_DYN_BOOST_ON_AC=1
|
||||
CPU_HWP_DYN_BOOST_ON_BAT=0
|
||||
|
||||
# Select platform profile:
|
||||
# performance, balanced, low-power.
|
||||
# Controls system operating characteristics around power/performance levels,
|
||||
# thermal and fan speed. Values are given in order of increasing power saving.
|
||||
# Note: check the output of tlp-stat -p to determine availability on your
|
||||
# hardware and additional profiles such as: balanced-performance, quiet, cool.
|
||||
# Default: <none>
|
||||
|
||||
PLATFORM_PROFILE_ON_AC=performance
|
||||
PLATFORM_PROFILE_ON_BAT=low-power
|
||||
|
||||
# Set the min/max/turbo frequency for the Intel GPU.
|
||||
# Possible values depend on your hardware. For available frequencies see
|
||||
# the output of tlp-stat -g.
|
||||
# Default: <none>
|
||||
|
||||
INTEL_GPU_MIN_FREQ_ON_AC=100
|
||||
INTEL_GPU_MIN_FREQ_ON_BAT=100
|
||||
INTEL_GPU_MAX_FREQ_ON_AC=1300
|
||||
INTEL_GPU_MAX_FREQ_ON_BAT=800
|
||||
INTEL_GPU_BOOST_FREQ_ON_AC=1300
|
||||
INTEL_GPU_BOOST_FREQ_ON_BAT=1100
|
||||
|
||||
# Wi-Fi power saving mode: on=enable, off=disable.
|
||||
# Default: off (AC), on (BAT)
|
||||
|
||||
#WIFI_PWR_ON_AC=off
|
||||
WIFI_PWR_ON_BAT=off
|
||||
|
||||
# PCIe Active State Power Management (ASPM):
|
||||
# default(*), performance, powersave, powersupersave.
|
||||
# (*) keeps BIOS ASPM defaults (recommended)
|
||||
# Default: <none>
|
||||
|
||||
#PCIE_ASPM_ON_AC=default
|
||||
PCIE_ASPM_ON_BAT=powersupersave
|
||||
|
||||
# Exclude PCIe devices assigned to the listed drivers from Runtime PM.
|
||||
# Note: this preserves the kernel driver default, to force a certain state
|
||||
# use RUNTIME_PM_ENABLE/DISABLE instead.
|
||||
# Separate multiple drivers with spaces.
|
||||
# Default: "mei_me nouveau radeon", use "" to disable completely.
|
||||
|
||||
RUNTIME_PM_DRIVER_DENYLIST=""
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<service>
|
||||
<short>steam-local-transfer</short>
|
||||
<description>Steam local transfer</description>
|
||||
<port protocol="tcp" port="57343"/>
|
||||
<port protocol="tcp" port="27040"/>
|
||||
</service>
|
||||
@@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Name=uBlue First Boot Setup
|
||||
Comment=Sets up the uBlue desktop on first boot.
|
||||
GenericName=Launcher
|
||||
Categories=Utility;System;
|
||||
Exec=/usr/share/ublue-os/firstboot/launcher/autostart.sh
|
||||
Icon=application-x-executable
|
||||
Terminal=false
|
||||
Type=Application
|
||||
4
files/files/usr/share/ublue-os/firstboot/launcher/autostart.sh
Executable file
4
files/files/usr/share/ublue-os/firstboot/launcher/autostart.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Simply launches the "yafti" GUI with the uBlue image's configuration.
|
||||
/usr/bin/yafti /usr/share/ublue-os/firstboot/yafti.yml
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 35 KiB |
@@ -0,0 +1,15 @@
|
||||
# Only process users with home directories, but skip the "root" user.
|
||||
if [ "$(id -u)" != "0" ] && [ ! -z "$HOME" ] && [ -d "$HOME" ]; then
|
||||
# Ensure target file exists and is a symlink (not a regular file or dir).
|
||||
if [ ! -L "$HOME"/.config/autostart/ublue-firstboot.desktop ]; then
|
||||
# Remove any leftovers or incorrect (non-link) files with the same name.
|
||||
rm -rf "$HOME"/.config/autostart/ublue-firstboot.desktop
|
||||
|
||||
# Create symlink to uBlue's autostart runner.
|
||||
# Note that "broken autostart symlinks" are harmless if they remain
|
||||
# after distro switching, and just cause a minor syslog warning. The
|
||||
# user can manually delete this file if they migrate away from uBlue.
|
||||
mkdir -p "$HOME"/.config/autostart
|
||||
ln -s "/usr/share/ublue-os/firstboot/launcher/autostart.desktop" "$HOME"/.config/autostart/ublue-firstboot.desktop
|
||||
fi
|
||||
fi
|
||||
141
files/files/usr/share/ublue-os/firstboot/yafti.yml
Normal file
141
files/files/usr/share/ublue-os/firstboot/yafti.yml
Normal file
@@ -0,0 +1,141 @@
|
||||
title: Welcome to Wunker OS!
|
||||
properties:
|
||||
mode: "run-on-change"
|
||||
screens:
|
||||
first-screen:
|
||||
source: yafti.screen.title
|
||||
values:
|
||||
title: "Welcome to Wunker OS!"
|
||||
icon: "/path/to/icon"
|
||||
description: |
|
||||
This guided installer will help you get started with your new system.
|
||||
can-we-modify-your-flatpaks:
|
||||
source: yafti.screen.consent
|
||||
values:
|
||||
title: Welcome, Traveler!
|
||||
condition:
|
||||
run: flatpak remotes --columns=name | grep fedora
|
||||
description: |
|
||||
We have detected the limited, Fedora-provided Flatpak remote on your system, whose applications are usually missing important codecs and other features. This step will therefore remove all basic Fedora Flatpaks from your system! We will instead switch all core Flatpak applications over to the vastly superior, unfiltered Flathub. If you don't want to do this, simply exit this installer.
|
||||
actions:
|
||||
- run: flatpak remote-delete --system --force fedora
|
||||
- run: flatpak remote-delete --user --force fedora
|
||||
- run: flatpak remove --system --noninteractive --all
|
||||
- run: flatpak remote-add --if-not-exists --system flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
- run: flatpak remote-add --if-not-exists --user flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
check-system-flathub:
|
||||
source: yafti.screen.consent
|
||||
values:
|
||||
title: Missing Flathub Repository (System)
|
||||
condition:
|
||||
run: flatpak remotes --system --columns=name | grep flathub | wc -l | grep '^0$'
|
||||
description: |
|
||||
We have detected that you don't have Flathub's repository on your system. We will now add that repository to your system-wide list.
|
||||
actions:
|
||||
- run: flatpak remote-add --if-not-exists --system flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
check-user-flathub:
|
||||
source: yafti.screen.consent
|
||||
values:
|
||||
title: Missing Flathub Repository (User)
|
||||
condition:
|
||||
run: flatpak remotes --user --columns=name | grep flathub | wc -l | grep '^0$'
|
||||
description: |
|
||||
We have detected that you don't have Flathub's repository on your current user account. We will now add that repository to your account.
|
||||
actions:
|
||||
- run: flatpak remote-add --if-not-exists --user flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
applications:
|
||||
source: yafti.screen.package
|
||||
values:
|
||||
title: Application Installer
|
||||
show_terminal: true
|
||||
package_manager: yafti.plugin.flatpak
|
||||
package_manager_defaults:
|
||||
user: true
|
||||
system: false
|
||||
groups:
|
||||
Core GNOME Apps:
|
||||
description: Core system applications for the GNOME desktop environment.
|
||||
default: true
|
||||
packages:
|
||||
- Calculator: org.gnome.Calculator
|
||||
- Calendar: org.gnome.Calendar
|
||||
- Characters: org.gnome.Characters
|
||||
- Cheese: org.gnome.Cheese
|
||||
- Clocks: org.gnome.clocks
|
||||
- Connections: org.gnome.Connections
|
||||
- Contacts: org.gnome.Contacts
|
||||
- Disk Usage Analyzer: org.gnome.baobab
|
||||
- Document Scanner: org.gnome.SimpleScan
|
||||
- Document Viewer: org.gnome.Evince
|
||||
- Extension Manager: com.mattjakeman.ExtensionManager
|
||||
- Font Viewer: org.gnome.font-viewer
|
||||
- Image Viewer: org.gnome.eog
|
||||
- Logs: org.gnome.Logs
|
||||
- Maps: org.gnome.Maps
|
||||
- Photos (Organizer): org.gnome.Photos
|
||||
- Sushi (Nautilus Previewer): org.gnome.NautilusPreviewer
|
||||
- Text Editor: org.gnome.TextEditor
|
||||
- Videos (Player): org.gnome.Totem
|
||||
- Weather: org.gnome.Weather
|
||||
System Apps:
|
||||
description: System applications for all desktop environments.
|
||||
default: false
|
||||
packages:
|
||||
- Deja Dup Backups: org.gnome.DejaDup
|
||||
- Fedora Media Writer: org.fedoraproject.MediaWriter
|
||||
- Flatseal (Permission Manager): com.github.tchx84.Flatseal
|
||||
- Font Downloader: org.gustavoperedo.FontDownloader
|
||||
- Mozilla Firefox: org.mozilla.firefox
|
||||
Web Browsers:
|
||||
description: Additional browsers to complement or replace Firefox.
|
||||
default: false
|
||||
packages:
|
||||
- Brave: com.brave.Browser
|
||||
- Google Chrome: com.google.Chrome
|
||||
- Microsoft Edge: com.microsoft.Edge
|
||||
- Opera: com.opera.Opera
|
||||
Gaming:
|
||||
description: "Rock and Stone!"
|
||||
default: false
|
||||
packages:
|
||||
- Bottles: com.usebottles.bottles
|
||||
- Discord: com.discordapp.Discord
|
||||
- GNOME Games: org.gnome.Games
|
||||
- Heroic Games Launcher: com.heroicgameslauncher.hgl
|
||||
- Steam: com.valvesoftware.Steam
|
||||
- Gamescope (Utility): com.valvesoftware.Steam.Utility.gamescope
|
||||
- MangoHUD (Utility): org.freedesktop.Platform.VulkanLayer.MangoHud//22.08
|
||||
- SteamTinkerLaunch (Utility): com.valvesoftware.Steam.Utility.steamtinkerlaunch
|
||||
- Proton Updater for Steam: net.davidotek.pupgui2
|
||||
Office:
|
||||
description: Boost your productivity.
|
||||
default: false
|
||||
packages:
|
||||
- LibreOffice: org.libreoffice.LibreOffice
|
||||
- OnlyOffice: org.onlyoffice.desktopeditors
|
||||
- Obsidian: md.obsidian.Obsidian
|
||||
- Slack: com.slack.Slack
|
||||
- Standard Notes: org.standardnotes.standardnotes
|
||||
- Thunderbird Email: org.mozilla.Thunderbird
|
||||
Streaming:
|
||||
description: Stream to the Internet.
|
||||
default: false
|
||||
packages:
|
||||
- OBS Studio: com.obsproject.Studio
|
||||
- VkCapture for OBS: com.obsproject.Studio.OBSVkCapture
|
||||
- Gstreamer for OBS: com.obsproject.Studio.Plugin.Gstreamer
|
||||
- Gstreamer VAAPI for OBS: com.obsproject.Studio.Plugin.GStreamerVaapi
|
||||
- Boatswain for Streamdeck: com.feaneron.Boatswain
|
||||
|
||||
final-screen:
|
||||
source: yafti.screen.title
|
||||
values:
|
||||
title: "All done!"
|
||||
icon: "/path/to/icon"
|
||||
# links:
|
||||
# - "Website":
|
||||
# run: /usr/bin/xdg-open https://ublue.it
|
||||
# - "Join the Discord Community":
|
||||
# run: /usr/bin/xdg-open https://discord.gg/XjG48C7VHx
|
||||
description: |
|
||||
Thanks for using Wunker OS, we hope you enjoy it!
|
||||
17
files/files/usr/share/ublue-os/just/custom.just
Normal file
17
files/files/usr/share/ublue-os/just/custom.just
Normal file
@@ -0,0 +1,17 @@
|
||||
!include /usr/share/ublue-os/just/bling.just
|
||||
|
||||
# Install all flatpaks defined in recipe.yml
|
||||
setup-flatpaks:
|
||||
#!/usr/bin/env bash
|
||||
echo 'Installing flatpaks from the ublue recipe ...'
|
||||
flatpaks=$(yq -- '.firstboot.flatpaks[]' "/usr/share/ublue-os/recipe.yml")
|
||||
for pkg in $flatpaks; do \
|
||||
echo "Installing: ${pkg}" && \
|
||||
flatpak install --user --noninteractive flathub $pkg; \
|
||||
done
|
||||
|
||||
# Include some of your custom scripts here!
|
||||
|
||||
# Add boot parameters needed for a Framework 13 laptop
|
||||
framework-13:
|
||||
rpm-ostree kargs --append="module_blacklist=hid_sensor_hub" --append="nvme.noacpi=1" --append="tpm_tis.interrupts=0"
|
||||
55
files/scripts/README.md
Normal file
55
files/scripts/README.md
Normal file
@@ -0,0 +1,55 @@
|
||||
# Custom scripts
|
||||
|
||||
You can add custom scripts to this directory and declare them to be run at build time in the `scripts:` section of `recipe.yml`. Custom scripts can be run at either the `pre:` execution phase right after the custom repositories are added, or at the `post:` phase after all of the automatic build steps.
|
||||
|
||||
Your scripts will be given exactly one argument when they are executed, which specifies its precise execution phase (`pre` or `post`). The primary purpose of this argument is to streamline the reuse of scripts for multiple stages. This argument is provided for both manually declared scripts and scripts ran by `autorun.sh`.
|
||||
|
||||
## Creating a script
|
||||
|
||||
Look at `example.sh` for an example shell script. You can rename and copy the file for your own purposes. In order for the script to be executed, either move it to `scripts/pre/` or `scripts/post/` (if using `autorun.sh`) or declare it in the `recipe.yml`.
|
||||
|
||||
All commands from RPMs you've declared in the `recipe.yml` should be available when running scripts at the `post` execution phase.
|
||||
|
||||
When creating a script, please make sure
|
||||
|
||||
- ...its filename ends with `.sh`.
|
||||
- This follows convention for (especially bash) shell scripts.
|
||||
- `autorun.sh` only executes files that match `*.sh`.
|
||||
- ...it starts with a [shebang](<https://en.wikipedia.org/wiki/Shebang_(Unix)>) like `#!/usr/bin/env bash`.
|
||||
- This ensures the script is ran with the correct interpreter / shell.
|
||||
- ...it contains the command `set -oue pipefail` near the start.
|
||||
- This will make the image build fail if your script fails. If you do not care if your script works or not, you can omit this line.
|
||||
|
||||
## `autorun.sh`
|
||||
|
||||
`autorun.sh` is a script that automatically runs all scripts in the folders `scripts/pre/` and `scripts/post/` at the correct execution phases. It is enabled by default, but you can disable it by removing it from `recipe.yml`. Manually listed scripts can be combined with `autorun.sh`.
|
||||
|
||||
There are a few rules, which aim to simplify your script management:
|
||||
|
||||
- `autorun.sh` will only execute scripts at the FIRST level within the directory, which
|
||||
means that anything stored in e.g. `scripts/pre/deeperfolder/` will NOT execute.
|
||||
This is intentional, so that you can store libraries and helper scripts
|
||||
within subdirectories.
|
||||
- You script directories and the scripts within them can be symlinks, to allow
|
||||
easy reuse of scripts. For example, if you want the same scripts to execute
|
||||
during both the `pre` and `post` stages, you could simply symlink individual
|
||||
scripts or the entire `pre` and `post` directories to each other. However,
|
||||
remember to only use RELATIVE symlinks, to ensure that the links work
|
||||
properly. For example, `ln -s ../pre/foo.sh scripts/post/foo.sh`.
|
||||
- All scripts execute in a numerically and alphabetically sorted order, which
|
||||
allows you to easily control the execution order of your scripts. If it's
|
||||
important that they execute in a specific order, then you should give them
|
||||
appropriate names. For example, `05-foo.s` would always execute before
|
||||
another script named `99-bar.sh`. It's recommended to use zero-padded,
|
||||
numerical prefixes when you want to specify the execution order.
|
||||
- The manually listed scripts in `recipe.yml` should
|
||||
be stored directly within `scripts/`, or in a custom subdirectory that
|
||||
doesn't match any of the execution phases. For example, you could
|
||||
set the `pre:` section of `recipe.yml` to execute both `autorun.sh`
|
||||
and `fizzwidget/something.sh`, and then place a bunch of auto-executed
|
||||
scripts under `scripts/pre/` for the autorunner. This makes it very simple
|
||||
to reuse common scripts between multiple different `recipe.yml` files,
|
||||
while also having some scripts be specific to different `recipe.yml`s.
|
||||
- You can safely specify `autorun.sh` as a script in `recipe.yml`,
|
||||
even if the special directories don't exist or don't contain any
|
||||
scripts. It will gracefully skip the processing if there's nothing to do.
|
||||
4
files/scripts/enable-crond.sh
Normal file
4
files/scripts/enable-crond.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
#/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
systemctl enable crond
|
||||
17
files/scripts/install-codelldb.sh
Normal file
17
files/scripts/install-codelldb.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
cd /usr/bin/
|
||||
|
||||
curl -L "https://github.com/vadimcn/vscode-lldb/releases/download/v1.7.0/codelldb-x86_64-linux.vsix" -o "codelldb-x86_64-linux.zip"
|
||||
|
||||
unzip "codelldb-x86_64-linux.zip" "extension/adapter/*" "extension/lldb/*" > /dev/null
|
||||
|
||||
rm -f "codelldb-x86_64-linux.zip"
|
||||
|
||||
mv extension/ codelldb_adapter
|
||||
|
||||
ln -s $(pwd)/codelldb_adapter/adapter/codelldb /usr/bin/codelldb
|
||||
|
||||
codelldb -h > /dev/null
|
||||
8
files/scripts/install-earthly.sh
Normal file
8
files/scripts/install-earthly.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
VERSION=v0.7.23
|
||||
|
||||
wget -q https://github.com/earthly/earthly/releases/download/$VERSION/earthly-linux-amd64 -O /usr/bin/earthly
|
||||
chmod +x /usr/bin/earthly
|
||||
30
files/scripts/install-intellij.sh
Normal file
30
files/scripts/install-intellij.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eou pipefail
|
||||
|
||||
# Version number
|
||||
VERSION="2023.1.2"
|
||||
|
||||
# Download https://download.jetbrains.com/idea/ideaIC-${VERSION}.tar.gz
|
||||
curl -L -o /tmp/ideaIC-${VERSION}.tar.gz https://download.jetbrains.com/idea/ideaIC-${VERSION}.tar.gz
|
||||
|
||||
# Extract to /usr/opt
|
||||
mkdir -p /usr/opt
|
||||
tar -xzf /tmp/ideaIC-${VERSION}.tar.gz -C /usr/opt
|
||||
|
||||
# Find the full path to the IntelliJ directory
|
||||
IDEA_PATH=$(ls -d /usr/opt/idea-IC-*)
|
||||
|
||||
# Create .desktop file
|
||||
cat > /tmp/intellij.desktop <<EOL
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Name=IntelliJ IDEA Community Edition
|
||||
Icon=$IDEA_PATH/bin/idea.png
|
||||
Exec="$IDEA_PATH/bin/idea.sh" %f
|
||||
Terminal=false
|
||||
Categories=Development;IDE;
|
||||
EOL
|
||||
|
||||
# Make the application available to all users
|
||||
sudo mv /tmp/intellij.desktop /usr/share/applications/
|
||||
7
files/scripts/install-mkcert.sh
Normal file
7
files/scripts/install-mkcert.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
curl -JLO "https://dl.filippo.io/mkcert/latest?for=linux/amd64"
|
||||
chmod +x mkcert-v*-linux-amd64
|
||||
cp mkcert-v*-linux-amd64 /usr/bin/mkcert
|
||||
5
files/scripts/install-pgadmin.sh
Normal file
5
files/scripts/install-pgadmin.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -oue pipefail
|
||||
|
||||
rpm -i https://ftp.postgresql.org/pub/pgadmin/pgadmin4/yum/pgadmin4-fedora-repo-2-1.noarch.rpm
|
||||
|
||||
30
files/scripts/install-rubymine.sh
Normal file
30
files/scripts/install-rubymine.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eou pipefail
|
||||
|
||||
# Version number
|
||||
VERSION="2023.1.2"
|
||||
|
||||
# Download https://download.jetbrains.com/ruby/RubyMine-2023.1.2.tar.gz
|
||||
curl -L -o /tmp/RubyMine-${VERSION}.tar.gz https://download.jetbrains.com/ruby/RubyMine-${VERSION}.tar.gz
|
||||
|
||||
# Extract to /usr/opt
|
||||
mkdir -p /usr/opt
|
||||
tar -xzf /tmp/RubyMine-${VERSION}.tar.gz -C /usr/opt
|
||||
|
||||
# Find the full path to the RubyMine directory
|
||||
RUBYMINE_PATH=$(ls -d /usr/opt/RubyMine-*)
|
||||
|
||||
# Create .desktop file
|
||||
cat > /tmp/rubymine.desktop <<EOL
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Name=RubyMine
|
||||
Icon=$RUBYMINE_PATH/bin/rubymine.png
|
||||
Exec="$RUBYMINE_PATH/bin/rubymine.sh" %f
|
||||
Terminal=false
|
||||
Categories=Development;IDE;
|
||||
EOL
|
||||
|
||||
# Make the application available to all users
|
||||
sudo mv /tmp/rubymine.desktop /usr/share/applications/
|
||||
46
files/scripts/install-syncthing.sh
Normal file
46
files/scripts/install-syncthing.sh
Normal file
@@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env bash
|
||||
set -oue pipefail
|
||||
|
||||
VERSION="v1.27.1"
|
||||
BASE_URL="https://github.com/syncthing/syncthing/releases/download"
|
||||
FILENAME="syncthing-linux-amd64-${VERSION}.tar.gz"
|
||||
EXTRACTED_DIR="syncthing-linux-amd64-${VERSION}"
|
||||
|
||||
# Download the file
|
||||
wget --quiet "${BASE_URL}/${VERSION}/${FILENAME}"
|
||||
|
||||
# Extract the file
|
||||
tar xf "${FILENAME}"
|
||||
|
||||
# Move the binary to /usr/local/bin
|
||||
mv "${EXTRACTED_DIR}/syncthing" /usr/bin
|
||||
|
||||
# Move .desktop files
|
||||
mv "${EXTRACTED_DIR}/etc/linux-desktop/"*.desktop /usr/share/applications/
|
||||
|
||||
# Move the systemd service file
|
||||
cp "${EXTRACTED_DIR}/etc/linux-systemd/user/syncthing.service" /etc/systemd/system/
|
||||
|
||||
# Enable the systemd service
|
||||
systemctl enable syncthing
|
||||
|
||||
# Verify the installation
|
||||
if command -v syncthing &> /dev/null
|
||||
then
|
||||
echo "Syncthing command is found in PATH."
|
||||
else
|
||||
echo "Syncthing command not found in PATH."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Verify that syncthing --version works
|
||||
if syncthing --version &> /dev/null
|
||||
then
|
||||
echo "Syncthing --version executes successfully."
|
||||
else
|
||||
echo "Syncthing --version did not execute successfully."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Cleanup
|
||||
rm -rf "${EXTRACTED_DIR}"
|
||||
12
files/scripts/setup-kubectl.sh
Normal file
12
files/scripts/setup-kubectl.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -oue pipefail
|
||||
|
||||
cat <<EOF | tee /etc/yum.repos.d/kubernetes.repo
|
||||
[kubernetes]
|
||||
name=Kubernetes
|
||||
baseurl=https://pkgs.k8s.io/core:/stable:/v1.29/rpm/
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=https://pkgs.k8s.io/core:/stable:/v1.29/rpm/repodata/repomd.xml.key
|
||||
EOF
|
||||
9
files/scripts/setup-openrgb-udev.sh
Normal file
9
files/scripts/setup-openrgb-udev.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Download udev rules file
|
||||
wget https://openrgb.org/releases/release_0.9/60-openrgb.rules -O /tmp/60-openrgb.rules
|
||||
|
||||
# Move udev rules file to udev rules directory
|
||||
mv /tmp/60-openrgb.rules /usr/lib/udev/rules.d
|
||||
15
files/scripts/setup-selinux-dockersock.sh
Normal file
15
files/scripts/setup-selinux-dockersock.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# https://docs.gitlab.com/runner/install/docker.html#selinux
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
git clone https://github.com/dpw/selinux-dockersock.git /tmp/selinux-dockersock
|
||||
|
||||
pushd /tmp/selinux-dockersock
|
||||
|
||||
make dockersock.pp
|
||||
|
||||
semodule -i dockersock.pp
|
||||
|
||||
popd
|
||||
6
files/scripts/setup-vscode.sh
Normal file
6
files/scripts/setup-vscode.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -oue pipefail
|
||||
|
||||
rpm --import https://packages.microsoft.com/keys/microsoft.asc
|
||||
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'
|
||||
Reference in New Issue
Block a user