# vim: set ft=make : uid := `id -u` shell := `grep :$(id -u): /etc/passwd | cut -d: -f7` # Boot into this device's BIOS/UEFI screen bios: #!/usr/bin/bash if [ -d /sys/firmware/efi ]; then systemctl reboot --firmware-setup else echo "Rebooting to legacy BIOS from OS is not supported." fi # Show BIOS info bios-info: #!/usr/bin/bash echo "Manufacturer: $(sudo dmidecode -s baseboard-manufacturer)" echo "Product Name: $(sudo dmidecode -s baseboard-product-name)" echo "Version: $(sudo dmidecode -s bios-version)" echo "Release Date: $(sudo dmidecode -s bios-release-date)" # Show all messages from this boot logs-this-boot: sudo journalctl --no-hostname -b 0 # Show all messages from last boot logs-last-boot: sudo journalctl --no-hostname -b -1 # Enroll Nvidia driver & KMOD signing key for secure boot - Enter password "universalblue" if prompted enroll-secure-boot-key: #!/usr/bin/bash ENROLLMENT_PASSWORD="universalblue" SECUREBOOT_KEY=/etc/pki/akmods/certs/akmods-ublue.der sudo mokutil --timeout -1 echo -e "$ENROLLMENT_PASSWORD\n$ENROLLMENT_PASSWORD" | sudo mokutil --import "$SECUREBOOT_KEY" echo -e 'At next reboot, the mokutil UEFI menu UI will be displayed (*QWERTY* keyboard input and navigation).\nThen, select "Enroll MOK", and input "universalblue" as the password' # Toggle display of the user-motd in terminal toggle-user-motd: #!/usr/bin/bash if test -e "${HOME}/.config/no-show-user-motd"; then rm -f "${HOME}/.config/no-show-user-motd" else if test ! -d "${HOME}/.config"; then mkdir "${HOME}/.config" fi touch "${HOME}/.config/no-show-user-motd" fi # Check for local overrides check-local-overrides: #!/usr/bin/bash diff -r \ --suppress-common-lines \ --color="always" \ --exclude "passwd*" \ --exclude "group*" \ --exclude="subgid*" \ --exclude="subuid*" \ --exclude="machine-id" \ --exclude="adjtime" \ --exclude="fstab" \ --exclude="system-connections" \ --exclude="shadow*" \ --exclude="gshadow*" \ --exclude="ssh_host*" \ --exclude="cmdline" \ --exclude="crypttab" \ --exclude="hostname" \ --exclude="localtime" \ --exclude="locale*" \ --exclude="*lock" \ --exclude=".updated" \ --exclude="*LOCK" \ --exclude="vconsole*" \ --exclude="00-keyboard.conf" \ --exclude="grub" \ --exclude="system.control*" \ --exclude="cdi" \ --exclude="default.target" \ /usr/etc /etc 2>/dev/null | sed '/Binary\ files\ /d' # Gather device info to a pastebin device-info: #!/usr/bin/bash fpaste <(rpm-ostree status) <(fpaste --sysinfo --printonly) <(flatpak list --columns=application,version,options) # Measure Idle Power Draw check-idle-power-draw: #!/usr/bin/bash sudo powerstat -a -r