diff --git a/files/scripts/example.sh b/files/scripts/example.sh index fdb2e04..747bec7 100644 --- a/files/scripts/example.sh +++ b/files/scripts/example.sh @@ -5,6 +5,5 @@ # builds actually ran successfully without any errors! set -oue pipefail -# Your code goes here. -echo 'This is an example shell script' -echo 'Scripts here will run during build if specified in recipe.yml' +sudo chmod 755 /usr/local/sbin/bls-add-bluefin.sh +sudo systemctl daemon-reload \ No newline at end of file diff --git a/files/system/boot/grub2/themes/thinkpad/background.png b/files/system/boot/grub2/themes/thinkpad/background.png new file mode 100644 index 0000000..3c7d4a5 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/background.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/icons/arch.png b/files/system/boot/grub2/themes/thinkpad/icons/arch.png new file mode 100644 index 0000000..215a3db Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/icons/arch.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/icons/bluefin.png b/files/system/boot/grub2/themes/thinkpad/icons/bluefin.png new file mode 100644 index 0000000..3cd982b Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/icons/bluefin.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/icons/debian.png b/files/system/boot/grub2/themes/thinkpad/icons/debian.png new file mode 100644 index 0000000..977bd78 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/icons/debian.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/icons/efi.png b/files/system/boot/grub2/themes/thinkpad/icons/efi.png new file mode 100644 index 0000000..9006a7c Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/icons/efi.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/icons/fedora.png b/files/system/boot/grub2/themes/thinkpad/icons/fedora.png new file mode 100644 index 0000000..0fc2a2f Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/icons/fedora.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/icons/freebsd.png b/files/system/boot/grub2/themes/thinkpad/icons/freebsd.png new file mode 100644 index 0000000..786ced9 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/icons/freebsd.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/icons/gentoo.png b/files/system/boot/grub2/themes/thinkpad/icons/gentoo.png new file mode 100644 index 0000000..2b10831 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/icons/gentoo.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/icons/gnu-linux.png b/files/system/boot/grub2/themes/thinkpad/icons/gnu-linux.png new file mode 100644 index 0000000..113f831 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/icons/gnu-linux.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/icons/gnu.png b/files/system/boot/grub2/themes/thinkpad/icons/gnu.png new file mode 100644 index 0000000..cb47573 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/icons/gnu.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/icons/kubuntu.png b/files/system/boot/grub2/themes/thinkpad/icons/kubuntu.png new file mode 100644 index 0000000..889bdc9 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/icons/kubuntu.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/icons/linuxmint.png b/files/system/boot/grub2/themes/thinkpad/icons/linuxmint.png new file mode 100644 index 0000000..f3a039a Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/icons/linuxmint.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/icons/memtest.png b/files/system/boot/grub2/themes/thinkpad/icons/memtest.png new file mode 100644 index 0000000..12edc90 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/icons/memtest.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/icons/opensuse.png b/files/system/boot/grub2/themes/thinkpad/icons/opensuse.png new file mode 100644 index 0000000..89e2b4c Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/icons/opensuse.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/icons/reactos.png b/files/system/boot/grub2/themes/thinkpad/icons/reactos.png new file mode 100644 index 0000000..ef38d55 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/icons/reactos.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/icons/red.png b/files/system/boot/grub2/themes/thinkpad/icons/red.png new file mode 100644 index 0000000..01d679e Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/icons/red.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/icons/restart.png b/files/system/boot/grub2/themes/thinkpad/icons/restart.png new file mode 100644 index 0000000..30851ab Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/icons/restart.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/icons/shutdown.png b/files/system/boot/grub2/themes/thinkpad/icons/shutdown.png new file mode 100644 index 0000000..bda2a93 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/icons/shutdown.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/icons/slackware.png b/files/system/boot/grub2/themes/thinkpad/icons/slackware.png new file mode 100644 index 0000000..91f1862 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/icons/slackware.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/icons/ubuntu.png b/files/system/boot/grub2/themes/thinkpad/icons/ubuntu.png new file mode 100644 index 0000000..1bf2425 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/icons/ubuntu.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/icons/uefi.png b/files/system/boot/grub2/themes/thinkpad/icons/uefi.png new file mode 100644 index 0000000..9006a7c Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/icons/uefi.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/icons/windows.png b/files/system/boot/grub2/themes/thinkpad/icons/windows.png new file mode 100644 index 0000000..f13c8cd Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/icons/windows.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/icons/xen.png b/files/system/boot/grub2/themes/thinkpad/icons/xen.png new file mode 100644 index 0000000..c926256 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/icons/xen.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/icons/xubuntu.png b/files/system/boot/grub2/themes/thinkpad/icons/xubuntu.png new file mode 100644 index 0000000..723725a Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/icons/xubuntu.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/lenovo_logo.png b/files/system/boot/grub2/themes/thinkpad/lenovo_logo.png new file mode 100644 index 0000000..e233a16 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/lenovo_logo.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/menu_inactive_e.png b/files/system/boot/grub2/themes/thinkpad/menu_inactive_e.png new file mode 100644 index 0000000..75a62a3 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/menu_inactive_e.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/menu_inactive_n.png b/files/system/boot/grub2/themes/thinkpad/menu_inactive_n.png new file mode 100644 index 0000000..7b6acc3 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/menu_inactive_n.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/menu_inactive_ne.png b/files/system/boot/grub2/themes/thinkpad/menu_inactive_ne.png new file mode 100644 index 0000000..6817166 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/menu_inactive_ne.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/menu_inactive_nw.png b/files/system/boot/grub2/themes/thinkpad/menu_inactive_nw.png new file mode 100644 index 0000000..6817166 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/menu_inactive_nw.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/menu_inactive_s.png b/files/system/boot/grub2/themes/thinkpad/menu_inactive_s.png new file mode 100644 index 0000000..7b6acc3 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/menu_inactive_s.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/menu_inactive_se.png b/files/system/boot/grub2/themes/thinkpad/menu_inactive_se.png new file mode 100644 index 0000000..6817166 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/menu_inactive_se.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/menu_inactive_sw.png b/files/system/boot/grub2/themes/thinkpad/menu_inactive_sw.png new file mode 100644 index 0000000..6817166 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/menu_inactive_sw.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/menu_inactive_w.png b/files/system/boot/grub2/themes/thinkpad/menu_inactive_w.png new file mode 100644 index 0000000..75a62a3 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/menu_inactive_w.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/menu_selected_e.png b/files/system/boot/grub2/themes/thinkpad/menu_selected_e.png new file mode 100644 index 0000000..a259302 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/menu_selected_e.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/menu_selected_n.png b/files/system/boot/grub2/themes/thinkpad/menu_selected_n.png new file mode 100644 index 0000000..a015eb0 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/menu_selected_n.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/menu_selected_ne.png b/files/system/boot/grub2/themes/thinkpad/menu_selected_ne.png new file mode 100644 index 0000000..7202352 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/menu_selected_ne.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/menu_selected_nw.png b/files/system/boot/grub2/themes/thinkpad/menu_selected_nw.png new file mode 100644 index 0000000..d8ed3a3 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/menu_selected_nw.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/menu_selected_s.png b/files/system/boot/grub2/themes/thinkpad/menu_selected_s.png new file mode 100644 index 0000000..a015eb0 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/menu_selected_s.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/menu_selected_se.png b/files/system/boot/grub2/themes/thinkpad/menu_selected_se.png new file mode 100644 index 0000000..d8ed3a3 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/menu_selected_se.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/menu_selected_sw.png b/files/system/boot/grub2/themes/thinkpad/menu_selected_sw.png new file mode 100644 index 0000000..d8ed3a3 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/menu_selected_sw.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/menu_selected_w.png b/files/system/boot/grub2/themes/thinkpad/menu_selected_w.png new file mode 100644 index 0000000..a259302 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/menu_selected_w.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/progress_active_c.png b/files/system/boot/grub2/themes/thinkpad/progress_active_c.png new file mode 100644 index 0000000..404a63a Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/progress_active_c.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/progress_inactive_c.png b/files/system/boot/grub2/themes/thinkpad/progress_inactive_c.png new file mode 100644 index 0000000..82020d0 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/progress_inactive_c.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/roboto-20.pf2 b/files/system/boot/grub2/themes/thinkpad/roboto-20.pf2 new file mode 100644 index 0000000..b04f811 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/roboto-20.pf2 differ diff --git a/files/system/boot/grub2/themes/thinkpad/roboto-22.pf2 b/files/system/boot/grub2/themes/thinkpad/roboto-22.pf2 new file mode 100644 index 0000000..71e25df Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/roboto-22.pf2 differ diff --git a/files/system/boot/grub2/themes/thinkpad/roboto-42.pf2 b/files/system/boot/grub2/themes/thinkpad/roboto-42.pf2 new file mode 100644 index 0000000..38cbeeb Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/roboto-42.pf2 differ diff --git a/files/system/boot/grub2/themes/thinkpad/separator.png b/files/system/boot/grub2/themes/thinkpad/separator.png new file mode 100644 index 0000000..4fc2cab Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/separator.png differ diff --git a/files/system/boot/grub2/themes/thinkpad/terminus-ttf-20.pf2 b/files/system/boot/grub2/themes/thinkpad/terminus-ttf-20.pf2 new file mode 100644 index 0000000..894f321 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/terminus-ttf-20.pf2 differ diff --git a/files/system/boot/grub2/themes/thinkpad/theme.txt b/files/system/boot/grub2/themes/thinkpad/theme.txt new file mode 100644 index 0000000..0382712 --- /dev/null +++ b/files/system/boot/grub2/themes/thinkpad/theme.txt @@ -0,0 +1,146 @@ +title-text: "" +desktop-image: "background.png" +desktop-color: "#ffffff" +terminal-font: "Terminus (TTF) Regular 20" +terminal-left: "0" +terminal-top: "0" +terminal-width: "100%" +terminal-height: "100%" +terminal-border: "0" + ++ image { + file = "thinkpad_logo.png" + top = 40 + left = 40 +} ++ image { + file = "lenovo_logo.png" + top = 40 + left = 100%-296 +} ++ image { + file = "separator.png" + top = 100%-106 + left = 0 + width = 100% + height = 4 +} + ++ progress_bar { + left = 50%-400 + top = 79%-20 + width = 800 + height = 40 + + id = "__timeout__" + text = "@TIMEOUT_NOTIFICATION_SHORT@" + + border_color = "white" + highlight_style = "progress_active_*.png" + bar_style = "progress_inactive_*.png" + font = "Roboto Regular 20" +} + + ++ label { + font = "Roboto Regular 42" + left = 0 + top = 4%+125 + width = 100% + color = "#9667cc" + align = "center" + text = "Select Boot Option" +} + ++ boot_menu { + left = 50%-400 + top = 50%-300 + width = 800 + height = 600 + item_font = "Roboto Regular 22" + item_color = "#FFFFFF" + selected_item_color = "#FFFFFF" + icon_width = 48 + icon_height = 48 + item_icon_space = 10 + item_height = 48 + item_padding = 20 + item_spacing = 10 + item_pixmap_style = "menu_inactive_*.png" + selected_item_pixmap_style = "menu_selected_*.png" +} + + ++ label { + font = "Roboto Regular 22" + left = 0% + top = 100%-66 + width = 13%-5 + color = "#398ecd" + align = "right" + text = "↑↓" +} ++ label { + font = "Roboto Regular 22" + left = 13%+5 + top = 100%-66 + color = "#FFFFFF" + align = "left" + text = "Select" +} + ++ label { + font = "Roboto Regular 22" + left = 25% + top = 100%-66 + width = 10%-5 + color = "#398ecd" + align = "right" + text = "Enter" +} ++ label { + font = "Roboto Regular 22" + left = 35%+5 + top = 100%-66 + color = "#FFFFFF" + align = "left" + text = "Boot" +} + ++ label { + font = "Roboto Regular 22" + left = 48% + top = 100%-66 + width = 10%-5 + color = "#398ecd" + align = "right" + text = "E" +} ++ label { + font = "Roboto Regular 22" + left = 58%+5 + top = 100%-66 + color = "#FFFFFF" + align = "left" + text = "Options" +} + ++ label { + font = "Roboto Regular 22" + left = 70% + top = 100%-66 + width = 10%-5 + color = "#398ecd" + align = "right" + text = "C" +} ++ label { + font = "Roboto Regular 22" + left = 80%+5 + top = 100%-66 + color = "#FFFFFF" + align = "left" + text = "Command Line" +} + + diff --git a/files/system/boot/grub2/themes/thinkpad/thinkpad_logo.png b/files/system/boot/grub2/themes/thinkpad/thinkpad_logo.png new file mode 100644 index 0000000..8c200a3 Binary files /dev/null and b/files/system/boot/grub2/themes/thinkpad/thinkpad_logo.png differ diff --git a/files/system/boot/grub2/user.cfg b/files/system/boot/grub2/user.cfg new file mode 100644 index 0000000..6e8110a --- /dev/null +++ b/files/system/boot/grub2/user.cfg @@ -0,0 +1,3 @@ +set theme="/boot/grub2/themes/thinkpad/theme.txt" +set timeout=2 +set gfxmode=1024x768,800x600 diff --git a/files/system/etc/systemd/system/ostree-finalize-staged.service.d/bluefin-icons.conf b/files/system/etc/systemd/system/ostree-finalize-staged.service.d/bluefin-icons.conf new file mode 100644 index 0000000..c21ab4c --- /dev/null +++ b/files/system/etc/systemd/system/ostree-finalize-staged.service.d/bluefin-icons.conf @@ -0,0 +1,6 @@ +[Service] +ExecStartPost= +ExecStopPost=/usr/bin/bash --noprofile --norc -lc '/usr/local/sbin/bls-add-bluefin.sh' +StandardOutput=journal +StandardError=journal +Environment=STARSHIP_LOG=off diff --git a/files/system/usr/local/sbin/bls-add-bluefin.sh b/files/system/usr/local/sbin/bls-add-bluefin.sh new file mode 100755 index 0000000..aae1797 --- /dev/null +++ b/files/system/usr/local/sbin/bls-add-bluefin.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +set -euo pipefail +shopt -s nullglob + +entries_dir="/boot/loader/entries" + +for f in "$entries_dir"/ostree-*.conf "$entries_dir"/*-ostree-*.conf; do + [ -f "$f" ] || continue + + # Already correct? skip + if grep -qxE 'grub_class[[:space:]]+bluefin' "$f"; then + continue + fi + + tmp="$(mktemp)" + if grep -qE '^grub_class[[:space:]]+' "$f"; then + sed -E 's/^grub_class[[:space:]].*/grub_class bluefin/' "$f" >"$tmp" + else + awk '1; /^title[[:space:]]/{print "grub_class bluefin";}' "$f" >"$tmp" + fi + + if ! cmp -s "$f" "$tmp"; then + chmod --reference="$f" "$tmp" + chown --reference="$f" "$tmp" + command -v chcon >/dev/null 2>&1 && chcon --reference="$f" "$tmp" 2>/dev/null || true + mv -f "$tmp" "$f" + else + rm -f "$tmp" + fi +done diff --git a/recipes/recipe.yml b/recipes/recipe.yml index 1dfae5f..4a10377 100644 --- a/recipes/recipe.yml +++ b/recipes/recipe.yml @@ -11,26 +11,25 @@ image-version: latest # latest is also supported if you want new updates ASAP # module configuration, executed in order # you can include multiple instances of the same module -# modules: -# - type: files -# files: -# - source: system -# destination: / # copies files/system/* (* means everything inside it) into your image's root folder / +modules: + - type: files + files: + - source: system + destination: / # copies files/system/* (* means everything inside it) into your image's root folder / -# - type: dnf -# repos: -# copr: -# - atim/starship -# install: -# packages: -# - micro -# - starship -# remove: -# packages: -# # example: removing firefox (in favor of the flatpak) -# # "firefox" is the main package, "firefox-langpacks" is a dependency -# - firefox -# - firefox-langpacks # also remove firefox dependency (not required for all packages, this is a special case) + - type: dnf + install: + packages: + - syncthing + - waydroid + remove: + packages: + - code + - docker-ce + - docker-ce-cli + - docker-ce-rootless-extras + - docker-compose-plugin + - docker-model-plugin # - type: default-flatpaks # configurations: