This commit is contained in:
Jeffrey Serio 2024-04-09 14:22:53 -05:00
parent e20fb4eb4e
commit 2a0cc8eded
2 changed files with 9 additions and 103 deletions

View File

@ -1,22 +0,0 @@
# hyperreal's Fedora kickstart
This is the kickstart file I use when (re)installing Fedora. I have two USB sticks plugged into the machine.
- USB 0: ext4 filesystem with the label "KS"; contains only the kickstart file located at /hyperreal.ks
- USB 1: [Fedora netinstall image](https://alt.fedoraproject.org)
I boot into the Fedora netinstall image, edit the GRUB menu by pressing `e`, and append the following to the kernel line after `quiet`:
``` bash
inst.ks=hd:LABEL=KS:/hyperreal.ks
```
If everything is correct, the installation proceeds. The Anaconda menu shows up and prompts me to enter the encryption passphrase. I also have to connect to the Internet from the Anaconda menu.
The kickstart file in this repository is not in any way part of or endorsed by the Fedora Project. It sets up repositories containing non-free software packages and proprietary firmware. It's not intended to be used as-is by anyone besides me.
For more information on Fedora kickstarts, see the links below:
- [Automating the Installation with Kickstart](https://docs.fedoraproject.org/en-US/fedora/f36/install-guide/advanced/Kickstart_Installations/)
- [https://pagure.io/fedora-kickstarts](https://pagure.io/fedora-kickstarts)
- [Kickstart Syntax Reference](https://docs.fedoraproject.org/en-US/fedora/f36/install-guide/appendixes/Kickstart_Syntax_Reference/#appe-kickstart-syntax-reference)

View File

@ -11,9 +11,9 @@ url --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$relea
# Storage and Partitioning # Storage and Partitioning
zerombr zerombr
network --bootproto=dhcp --device=link --activate --hostname=moonshadow network --bootproto=dhcp --device=link --activate --hostname=ravenwatch
ignoredisk --only-use=nvme0n1 ignoredisk --only-use=nvme1n1
clearpart --drives=nvme0n1 --all clearpart --drives=nvme1n1 --all
autopart --type=btrfs --encrypted --noswap autopart --type=btrfs --encrypted --noswap
bootloader --timeout=5 bootloader --timeout=5
@ -73,18 +73,15 @@ ImageMagick
ShellCheck ShellCheck
autossh autossh
bat bat
btrbk borgbackup
borgmatic
cmake cmake
dnf-utils dnf-utils
emacs emacs
exa
fd-find fd-find
flatpak flatpak
fzf fzf
golang golang
golang-x-tools-gopls
golang-x-tools-guru
googler
google-rubik-fonts google-rubik-fonts
gstreamer1-plugin-openh264 gstreamer1-plugin-openh264
gstreamer1-libav gstreamer1-libav
@ -125,7 +122,6 @@ snapper
trash-cli trash-cli
vlc vlc
w3m w3m
wireguard-tools
wireshark wireshark
youtube-dl youtube-dl
zsh zsh
@ -138,7 +134,7 @@ zsh
%post --log=/root/hyperreal-ks-post.log %post --log=/root/hyperreal-ks-post.log
# Configure DNF plugins # Configure DNF plugins
printf "fastestmirror=True\ndeltarpm=True\nmax_parallel_downloads=10\n" | tee -a /etc/dnf/dnf.conf printf "fastestmirror=True\ndeltarpm=True\n" | tee -a /etc/dnf/dnf.conf
# Configure sudo for user # Configure sudo for user
echo "jas ALL=(ALL) NOPASSWD: ALL" | tee /etc/sudoers.d/jas echo "jas ALL=(ALL) NOPASSWD: ALL" | tee /etc/sudoers.d/jas
@ -147,9 +143,9 @@ echo "jas ALL=(ALL) NOPASSWD: ALL" | tee /etc/sudoers.d/jas
dnf copr enable -y atim/starship dnf copr enable -y atim/starship
dnf copr enable -y varlad/zellij dnf copr enable -y varlad/zellij
dnf copr enable -y hyperreal/better_fonts dnf copr enable -y hyperreal/better_fonts
dnf copr enable -y hyperreal/amfora
# Install COPR packages # Install COPR packages
dnf install -y starship zellij fontconfig-enhanced-defaults fontconfig-font-replacements dnf install -y starship zellij fontconfig-enhanced-defaults fontconfig-font-replacements amfora
# Add Charm repo # Add Charm repo
cat <<EOF > /etc/yum.repos.d/charm.repo cat <<EOF > /etc/yum.repos.d/charm.repo
@ -169,65 +165,11 @@ dnf install -y \
https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \ https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
sys_vendor=$(cat /sys/devices/virtual/dmi/id/sys_vendor)
# Install System76 hardware and firmware packages and enable services
if [ "$sys_vendor" = "System76" ]; then
dnf copr enable -y szydell/system76
dnf install -y system76-acpi-dkms system76-dkms system76-driver system76-firmware system76-io-dkms system76-power firmware-manager
systemctl enable system76-firmware-daemon.service com.system76.PowerDaemon.service
fi
# Set vim as the default editor # Set vim as the default editor
dnf install -y --allowerasing vim-default-editor dnf install -y --allowerasing vim-default-editor
# Install ffmpeg-libs and megasync # Install ffmpeg-libs and megasync
dnf install -y --allowerasing ffmpeg-libs megasync dnf install -y --allowerasing ffmpeg-libs
# Configure btrbk
cat <<EOF > /etc/btrbk/btrbk.conf
transaction_log /var/log/btrbk.log
snapshot_preserve_min latest
target_preserve 24h 7d 1m 1y
target_preserve_min 7d
ssh_user btrbk
ssh_identity /etc/btrbk/ssh/id_ed25519
backend btrfs-progs-sudo
snapshot_dir /btrbk_snapshots
target ssh://10.0.0.158/srv/storage/$(hostname)
subvolume /
subvolume /home
snapshot_create ondemand
EOF
touch /var/log/btrbk.log
mkdir /btrbk_snapshots
# Setup btrbk systemd services
cat <<EOF > /etc/systemd/system/btrbk.service
[Unit]
Description=Daily btrbk backup creation
[Service]
Type=simple
ExecStart=/usr/bin/btrbk -q -c /etc/btrbk/btrbk.conf run
EOF
cat <<EOF > /etc/systemd/system/btrbk.timer
[Unit]
Description=Daily btrbk backup creation
[Timer]
OnCalendar=*-*-* 00:15:00
Persistent=true
[Install]
WantedBy=timers.target
EOF
# Install Mullvad VPN
curl -sSL https://mullvad.net/en/download/app/rpm/latest -o /tmp/mullvad.rpm
dnf install -y /tmp/mullvad.rpm
# Configure xdg-user-dirs # Configure xdg-user-dirs
cat <<EOF > /etc/xdg/user-dirs.defaults cat <<EOF > /etc/xdg/user-dirs.defaults
@ -249,18 +191,4 @@ EOF
systemctl enable snapper-cleanup.timer systemctl enable snapper-cleanup.timer
systemctl enable snapper-timeline.timer systemctl enable snapper-timeline.timer
# Copy home directory to new system
# Requires home directory contents to be on same disk as kickstart under
# /staging-$(hostname)
mount /dev/disk/by-label/KS /mnt
rsync -aAX /mnt/staging-"$(hostname)"/ /home/jas
chown -R jas:jas /home/jas
umount /mnt
# Restore SELinux contexts for /home
restorecon -R /home
# Set user shell to zsh
usermod -s /usr/bin/zsh jas
%end %end