From 3adab49a21295ad6cb18904bccde3353293210b4 Mon Sep 17 00:00:00 2001 From: bri <284789+b-@users.noreply.github.com> Date: Fri, 13 Oct 2023 19:52:45 -0400 Subject: [PATCH] stage ujust changes from pr --- usr/share/ublue-os/just/00-default.just | 44 +++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 usr/share/ublue-os/just/00-default.just diff --git a/usr/share/ublue-os/just/00-default.just b/usr/share/ublue-os/just/00-default.just new file mode 100644 index 00000000000..a8115bd83dd --- /dev/null +++ b/usr/share/ublue-os/just/00-default.just @@ -0,0 +1,44 @@ +# vim: set ft=make : + +set allow-duplicate-recipes +set ignore-comments + +_default: + @just --unstable --list --list-heading $'Available commands:\n' --list-prefix $' - ' + +# Boot into this device's BIOS/UEFI screen +bios: + systemctl reboot --firmware-setup + +# Change the user's shell +chsh new_shell: + #!/usr/bin/env bash + set -euo pipefail + if [ "{{shell}}" = "{{new_shell}}" ] ; then + printf "Your shell is already set to %s.\n" "{{new_shell}}" + else + if [ -x "{{new_shell}}" ] ; then + sudo usermod $USER --shell "{{new_shell}}" + printf "%s's shell is now %s.\n" "$USER" "{{new_shell}}" + else + echo "{{new_shell}} does not exist or is not executable!" + fi + fi + +# Regenerate GRUB config, useful in dual-boot scenarios where a second operating system isn't listed +regenerate-grub: + #!/usr/bin/env bash + if [ -d /sys/firmware/efi ]; then + sudo grub2-mkconfig -o /etc/grub2-efi.cfg + else + sudo grub2-mkconfig -o /etc/grub2.cfg + fi + +# Show the changelog +changelogs: + rpm-ostree db diff --changelogs + +# Enroll Nvidia driver & KMOD signing key for secure boot - Enter password "ublue-os" if prompted +enroll-secure-boot-key: + sudo mokutil --import /etc/pki/akmods/certs/akmods-ublue.der + echo 'Enter password "ublue-os" if prompted'