mirror of
https://codeberg.org/hyperreal/fedora-ks
synced 2024-11-01 08:43:08 +01:00
The proverbial initial commit
This commit is contained in:
commit
b888e50784
22
README.org
Normal file
22
README.org
Normal file
@ -0,0 +1,22 @@
|
||||
#+title: 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: [[https://alt.fedoraproject.org/][Fedora netinstall image]]
|
||||
|
||||
I boot into the Fedora netinstall image, edit the GRUB menu by pressing ~e~, and append the following to the kernel line after ~quiet~:
|
||||
|
||||
#+begin_src
|
||||
inst.ks=hd:LABEL=KS:/hyperreal.ks
|
||||
#+end_src
|
||||
|
||||
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:
|
||||
|
||||
- [[https://docs.fedoraproject.org/en-US/fedora/f36/install-guide/advanced/Kickstart_Installations/][Automating the Installation with Kickstart]]
|
||||
- [[https://pagure.io/fedora-kickstarts]]
|
||||
- [[https://docs.fedoraproject.org/en-US/fedora/f36/install-guide/appendixes/Kickstart_Syntax_Reference/#appe-kickstart-syntax-reference][Kickstart Syntax Reference]]
|
266
fedora-hyperreal.ks
Normal file
266
fedora-hyperreal.ks
Normal file
@ -0,0 +1,266 @@
|
||||
# fedora-hyperreal.ks
|
||||
#
|
||||
# Description:
|
||||
# - hyperreal's customized FedoraRemix Xfce kickstart
|
||||
#
|
||||
# Maintainer
|
||||
# - Jeffrey Serio <hyperreal@fedoraproject.org>
|
||||
|
||||
# Installation Methods and Sources
|
||||
url --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
|
||||
|
||||
# Storage and Partitioning
|
||||
zerombr
|
||||
network --bootproto=dhcp --device=link --activate --hostname=moonshadow
|
||||
ignoredisk --only-use=nvme0n1
|
||||
clearpart --drives=nvme0n1 --all
|
||||
autopart --type=btrfs --encrypted --noswap
|
||||
bootloader --timeout=5
|
||||
|
||||
# Network Configuration
|
||||
firewall --enabled --service=mdns
|
||||
|
||||
# Console and Environment
|
||||
graphical
|
||||
keyboard --vckeymap=us --xlayouts='us'
|
||||
lang en_US.UTF-8
|
||||
services --enabled=sshd,NetworkManager,chronyd,bluetooth
|
||||
timezone America/Chicago
|
||||
xconfig --startxonboot
|
||||
|
||||
# Installation Environment
|
||||
graphical
|
||||
|
||||
# After the installation
|
||||
firstboot --reconfig
|
||||
|
||||
%packages
|
||||
|
||||
# fedora-disk-base
|
||||
kernel
|
||||
kernel-modules
|
||||
kernel-modules-extra
|
||||
-kernel-lpae
|
||||
dracut-config-generic
|
||||
-dracut-config-rescue
|
||||
aajohan-comfortaa-fonts
|
||||
glibc-all-langpacks
|
||||
|
||||
# fedora-xfce-common
|
||||
fedora-release-xfce
|
||||
@^xfce-desktop-environment
|
||||
@xfce-apps
|
||||
@xfce-extra-plugins
|
||||
@xfce-media
|
||||
@xfce-office
|
||||
wget
|
||||
system-config-printer
|
||||
-autofs
|
||||
-acpid
|
||||
-gimp-help
|
||||
-desktop-backgrounds-basic
|
||||
-aspell-*
|
||||
-xfce4-sensors-plugin
|
||||
-xfce4-eyes-plugin
|
||||
xfce4-cpugraph-plugin
|
||||
xfce4-docklike-plugin
|
||||
xfce4-genmon-plugin
|
||||
xfce4-clipman-plugin
|
||||
xfce4-weather-plugin
|
||||
|
||||
# Fedora repo packages
|
||||
ImageMagick
|
||||
ShellCheck
|
||||
autossh
|
||||
bat
|
||||
btrbk
|
||||
cmake
|
||||
dnf-utils
|
||||
emacs
|
||||
exa
|
||||
fd-find
|
||||
flatpak
|
||||
fzf
|
||||
golang
|
||||
golang-x-tools-gopls
|
||||
golang-x-tools-guru
|
||||
googler
|
||||
google-rubik-fonts
|
||||
gstreamer1-plugin-openh264
|
||||
gstreamer1-libav
|
||||
gstreamer1-plugins-bad-free
|
||||
gstreamer1-plugins-bad-free-extras
|
||||
gstreamer1-plugins-bad-freeworld
|
||||
gstreamer1-plugins-base
|
||||
gstreamer1-plugins-good
|
||||
gstreamer1-plugins-good-extras
|
||||
gstreamer1-plugins-good-gtk
|
||||
gstreamer1-plugins-good-qt
|
||||
gstreamer1-plugins-good-qt6
|
||||
httpie
|
||||
hugo
|
||||
inxi
|
||||
just
|
||||
lagrange
|
||||
libtool
|
||||
marked
|
||||
mediawriter
|
||||
mpv
|
||||
neofetch
|
||||
nmap
|
||||
nodejs
|
||||
nodejs-npm
|
||||
openssl-devel
|
||||
papirus-icon-theme
|
||||
pass
|
||||
podman-compose
|
||||
prettyping
|
||||
python3-devel
|
||||
python3-pip
|
||||
ripgrep
|
||||
rofi
|
||||
rofimoji
|
||||
shfmt
|
||||
snapper
|
||||
trash-cli
|
||||
vlc
|
||||
w3m
|
||||
wireguard-tools
|
||||
wireshark
|
||||
youtube-dl
|
||||
zsh
|
||||
'@c-development'
|
||||
'@development-tools'
|
||||
'@container-management'
|
||||
|
||||
%end
|
||||
|
||||
%post --log=/root/hyperreal-ks-post.log
|
||||
|
||||
# Configure DNF plugins
|
||||
printf "fastestmirror=True\ndeltarpm=True\nmax_parallel_downloads=10\n" | tee -a /etc/dnf/dnf.conf
|
||||
|
||||
# Configure sudo for user
|
||||
echo "jas ALL=(ALL) NOPASSWD: ALL" | tee /etc/sudoers.d/jas
|
||||
|
||||
# Add COPR repos
|
||||
dnf copr enable -y atim/starship
|
||||
dnf copr enable -y varlad/zellij
|
||||
dnf copr enable -y hyperreal/better_fonts
|
||||
|
||||
# Install COPR packages
|
||||
dnf install -y starship zellij fontconfig-enhanced-defaults fontconfig-font-replacements
|
||||
|
||||
# Add Charm repo
|
||||
cat <<EOF > /etc/yum.repos.d/charm.repo
|
||||
[charm]
|
||||
name=Charm
|
||||
baseurl=https://repo.charm.sh/yum/
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=https://repo.charm.sh/yum/gpg.key
|
||||
EOF
|
||||
|
||||
# Install Charm packages
|
||||
dnf install -y charm glow gum skate wishlist
|
||||
|
||||
# Setup rpmfusion repos
|
||||
dnf install -y \
|
||||
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
|
||||
|
||||
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
|
||||
dnf install -y --allowerasing vim-default-editor
|
||||
|
||||
# Install ffmpeg-libs and megasync
|
||||
dnf install -y --allowerasing ffmpeg-libs megasync
|
||||
|
||||
# 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
|
||||
cat <<EOF > /etc/xdg/user-dirs.defaults
|
||||
# Default settings for user directories
|
||||
#
|
||||
# The values are relative pathnames from the home directory and
|
||||
# will be translated on a per-path-element basis into the users locale
|
||||
DESKTOP=desktop
|
||||
DOWNLOAD=downloads
|
||||
TEMPLATES=
|
||||
PUBLICSHARE=sync
|
||||
DOCUMENTS=sync/documents
|
||||
MUSIC=
|
||||
PICTURES=sync/pictures
|
||||
VIDEOS=
|
||||
EOF
|
||||
|
||||
# Setup snapper services
|
||||
systemctl enable snapper-cleanup.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
|
Loading…
Reference in New Issue
Block a user