lots of updates
This commit is contained in:
parent
1d702fe145
commit
5f85f4d04a
2
configs/flatpak/com.github.tchx84.Flatseal
Normal file
2
configs/flatpak/com.github.tchx84.Flatseal
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[Context]
|
||||||
|
filesystems=!xdg-download
|
||||||
2
configs/flatpak/com.gitlab.cutecom.cutecom
Normal file
2
configs/flatpak/com.gitlab.cutecom.cutecom
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[Context]
|
||||||
|
filesystems=!xdg-download
|
||||||
2
configs/flatpak/com.obsproject.Studio
Normal file
2
configs/flatpak/com.obsproject.Studio
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[Context]
|
||||||
|
filesystems=xdg-videos
|
||||||
@ -1,2 +1,2 @@
|
|||||||
[Context]
|
[Context]
|
||||||
filesystems=~/.local/share/PrusaSlicer
|
filesystems=~/projects:ro
|
||||||
|
|||||||
3
configs/flatpak/com.valvesoftware.Steam
Normal file
3
configs/flatpak/com.valvesoftware.Steam
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[Context]
|
||||||
|
features=!bluetooth
|
||||||
|
filesystems=!xdg-run/app/com.discordapp.Discord
|
||||||
@ -1,2 +0,0 @@
|
|||||||
[Context]
|
|
||||||
filesystems=xdg-documents/git
|
|
||||||
@ -1,2 +1,2 @@
|
|||||||
[Context]
|
[Context]
|
||||||
filesystems=/media;/mnt/data/media/movies;!host
|
filesystems=/mnt/media/
|
||||||
|
|||||||
@ -1,2 +1,3 @@
|
|||||||
[Context]
|
[Context]
|
||||||
|
sockets=fallback-x11;wayland;x11
|
||||||
filesystems=xdg-download;!home;!host
|
filesystems=xdg-download;!home;!host
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
[Context]
|
[Context]
|
||||||
filesystems=!xdg-download;!xdg-run/app/com.discordapp.Discord;!/run/media;!/mnt;!/media;~/projects/kladjes
|
filesystems=!xdg-download;!xdg-run/app/com.discordapp.Discord;!/run/media;!/mnt;!/media;~/projects/freenen/kladjes
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
[Context]
|
[Context]
|
||||||
filesystems=xdg-documents/blender
|
filesystems=~/projects
|
||||||
|
|||||||
2
configs/flatpak/org.filezillaproject.Filezilla
Normal file
2
configs/flatpak/org.filezillaproject.Filezilla
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[Context]
|
||||||
|
filesystems=~/projects:ro
|
||||||
2
configs/flatpak/org.freecad.FreeCAD
Normal file
2
configs/flatpak/org.freecad.FreeCAD
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[Context]
|
||||||
|
filesystems=~/projects
|
||||||
2
configs/flatpak/org.inkscape.Inkscape
Normal file
2
configs/flatpak/org.inkscape.Inkscape
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[Context]
|
||||||
|
filesystems=~/projects
|
||||||
@ -1,2 +1,2 @@
|
|||||||
[Context]
|
[Context]
|
||||||
filesystems=xdg-documents/kicad
|
filesystems=~/projects
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
[Context]
|
[Context]
|
||||||
filesystems=~/.thunderbird
|
devices=!all
|
||||||
|
|||||||
2
configs/flatpak/org.mozilla.firefox
Normal file
2
configs/flatpak/org.mozilla.firefox
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[Context]
|
||||||
|
filesystems=~/.local/tiCloudAgent;~/.local/share/vdhcoapp:ro
|
||||||
2
configs/flatpak/org.openscad.OpenSCAD
Normal file
2
configs/flatpak/org.openscad.OpenSCAD
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[Context]
|
||||||
|
filesystems=~/projects:ro
|
||||||
2
configs/flatpak/org.raspberrypi.rpi-imager
Normal file
2
configs/flatpak/org.raspberrypi.rpi-imager
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[Context]
|
||||||
|
filesystems=!/media
|
||||||
@ -1,7 +1,7 @@
|
|||||||
[user]
|
[user]
|
||||||
name = FReenen
|
name = LailaTheElf
|
||||||
email = git@finnvanreenen.nl
|
email = mail@lailatheelf.nl
|
||||||
signingKey = 97BC6A12A9D93B120B2EDD7E1F4E6EE3E6DDF769
|
signingKey = EB05B87D06C84E807C8D128B8A3EF0226518C12D
|
||||||
|
|
||||||
[commit]
|
[commit]
|
||||||
gpgsign = true
|
gpgsign = true
|
||||||
|
|||||||
@ -3,9 +3,10 @@ HOSTNAME="elfDesktop"
|
|||||||
UEFI_DISK="/dev/nvme0n1"
|
UEFI_DISK="/dev/nvme0n1"
|
||||||
DISK="/dev/nvme0n1"
|
DISK="/dev/nvme0n1"
|
||||||
|
|
||||||
USERNAME="freenen"
|
USERNAME="laila"
|
||||||
USER_SSH_KEYS="nl.freenen.elfLaptop nl.freenen.digipap.rsa nl.freenen.fp4.ed"
|
USER_SSH_KEYS="nl.freenen.elfLaptop nl.freenen.digipap.rsa nl.freenen.fp4.ed"
|
||||||
|
|
||||||
|
ENCRYPT_DISK="false"
|
||||||
SFDISK_FILE="./configs/elfDesktop.sfdisk"
|
SFDISK_FILE="./configs/elfDesktop.sfdisk"
|
||||||
UEFI_PARTITION="${UEFI_DISK}p1"
|
UEFI_PARTITION="${UEFI_DISK}p1"
|
||||||
SWAP_PARTITION="${DISK}p2"
|
SWAP_PARTITION="${DISK}p2"
|
||||||
|
|||||||
@ -2,8 +2,11 @@
|
|||||||
HOSTNAME="ELFLaptop"
|
HOSTNAME="ELFLaptop"
|
||||||
UEFI_DISK="/dev/sdb"
|
UEFI_DISK="/dev/sdb"
|
||||||
DISK="/dev/sdb"
|
DISK="/dev/sdb"
|
||||||
USERNAME="freenen"
|
|
||||||
|
|
||||||
|
USERNAME="laila"
|
||||||
|
USER_SSH_KEYS="nl.freenen.elfDesktop nl.freenen.digipap.rsa nl.freenen.fp4.ed"
|
||||||
|
|
||||||
|
ENCRYPT_DISK="true"
|
||||||
SFDISK_FILE="./configs/elfLaptop.sfdisk"
|
SFDISK_FILE="./configs/elfLaptop.sfdisk"
|
||||||
UEFI_PARTITION="${UEFI_DISK}1"
|
UEFI_PARTITION="${UEFI_DISK}1"
|
||||||
SWAP_PARTITION="${DISK}2"
|
SWAP_PARTITION="${DISK}2"
|
||||||
|
|||||||
49
elf_os.sh
49
elf_os.sh
@ -34,18 +34,22 @@ function run-chroot(){
|
|||||||
|
|
||||||
echo "" >install.log
|
echo "" >install.log
|
||||||
|
|
||||||
|
if [[ $ENCRYPT_DISK = "true" ]]
|
||||||
|
then
|
||||||
|
|
||||||
echo -n "disk encryption password: "
|
echo -n "disk encryption password: "
|
||||||
read -s PASS
|
read -s PASS
|
||||||
echo
|
echo
|
||||||
echo -n "retype password: "
|
echo -n "retype password: "
|
||||||
read -s PASSRE
|
read -s PASSRE
|
||||||
echo
|
echo
|
||||||
|
|
||||||
if [ "$PASS" != "$PASSRE" ]; then
|
if [ "$PASS" != "$PASSRE" ]; then
|
||||||
echo "password do not match"
|
echo "password do not match"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
echo -n "password for freenen: "
|
echo -n "password for freenen: "
|
||||||
read -s PASS_USER
|
read -s PASS_USER
|
||||||
echo
|
echo
|
||||||
@ -73,19 +77,30 @@ echo
|
|||||||
run "applly partion table" "sfdisk $DISK <$SFDISK_FILE"
|
run "applly partion table" "sfdisk $DISK <$SFDISK_FILE"
|
||||||
run "format boot partition" "mkfs.fat -F 32 ${UEFI_PARTITION}"
|
run "format boot partition" "mkfs.fat -F 32 ${UEFI_PARTITION}"
|
||||||
run "format swap partition" "mkswap ${SWAP_PARTITION}"
|
run "format swap partition" "mkswap ${SWAP_PARTITION}"
|
||||||
|
ROOT_PARTITION_MAP=""
|
||||||
|
if [[ $ENCRYPT_DISK = "true" ]]
|
||||||
|
then
|
||||||
|
ROOT_PARTITION_MAP="/dev/mapper/cryptelfroot"
|
||||||
|
ROOT_PARTITION_MAP_NAME="cryptelfroot"
|
||||||
echo -n "$PASS" >keyfile.luks
|
echo -n "$PASS" >keyfile.luks
|
||||||
run "encrypt root partition" "cryptsetup luksFormat --batch-mode --key-file keyfile.luks ${ROOT_PARTITION}" "rm keyfile.luks"
|
run "encrypt root partition" "cryptsetup luksFormat --batch-mode --key-file keyfile.luks ${ROOT_PARTITION}" "rm keyfile.luks"
|
||||||
run "map root partitaion" "cryptsetup open --batch-mode --key-file keyfile.luks ${ROOT_PARTITION} cryptelfroot" "rm keyfile.luks"
|
run "map root partitaion" "cryptsetup open --batch-mode --key-file keyfile.luks ${ROOT_PARTITION} ${ROOT_PARTITION_MAP_NAME}" "rm keyfile.luks"
|
||||||
rm keyfile.luks
|
rm keyfile.luks
|
||||||
run "format root partition" "mkfs.btrfs /dev/mapper/cryptelfroot"
|
run "format root partition" "mkfs.btrfs ${ROOT_PARTITION_MAP}"
|
||||||
|
else
|
||||||
|
ROOT_PARTITION_MAP="${ROOT_PARTITION}"
|
||||||
|
run "format root partition" "mkfs.btrfs ${ROOT_PARTITION}"
|
||||||
|
fi
|
||||||
|
|
||||||
run "mount root partition" "mount /dev/mapper/cryptelfroot /mnt"
|
run "mount root partition" "mount ${ROOT_PARTITION_MAP} /mnt"
|
||||||
run "create root btrfs subvolume" "btrfs subvolume create /mnt/@elfRoot"
|
run "create root btrfs subvolume" "btrfs subvolume create /mnt/@elfRoot"
|
||||||
run "create home btrfs subvolume" "btrfs subvolume create /mnt/@home"
|
run "create home btrfs subvolume" "btrfs subvolume create /mnt/@home"
|
||||||
|
run "create home btrfs subvolume" "btrfs subvolume create /mnt/@var"
|
||||||
run "unmount btrfs" "umount /mnt"
|
run "unmount btrfs" "umount /mnt"
|
||||||
run "mount root subvolume" "mount -o subvol=@elfRoot /dev/mapper/cryptelfroot /mnt"
|
run "mount root subvolume" "mount -o subvol=@elfRoot ${ROOT_PARTITION_MAP} /mnt"
|
||||||
|
run "mount home subvolume" "mount --mkdir -o subvol=@home ${ROOT_PARTITION_MAP} /mnt/home"
|
||||||
|
run "mount home subvolume" "mount --mkdir -o subvol=@var ${ROOT_PARTITION_MAP} /mnt/var"
|
||||||
run "mount boot partition" "mount --mkdir ${UEFI_PARTITION} /mnt/boot"
|
run "mount boot partition" "mount --mkdir ${UEFI_PARTITION} /mnt/boot"
|
||||||
run "mount home subvolume" "mount --mkdir -o subvol=@home /dev/mapper/cryptelfroot /mnt/home"
|
|
||||||
run "enable swap" "swapon ${SWAP_PARTITION}"
|
run "enable swap" "swapon ${SWAP_PARTITION}"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
@ -122,19 +137,31 @@ run-chroot "config initramfs" "sed --in-place -e 's/HOOKS=(.*)/HOOKS=
|
|||||||
run-chroot "generate initramfs" "mkinitcpio -P"
|
run-chroot "generate initramfs" "mkinitcpio -P"
|
||||||
|
|
||||||
DISKUUID=$(blkid --output export ${ROOT_PARTITION} | grep '^UUID' | sed 's/UUID=//')
|
DISKUUID=$(blkid --output export ${ROOT_PARTITION} | grep '^UUID' | sed 's/UUID=//')
|
||||||
|
BOAT_LOADER_OPTIONS=""
|
||||||
|
if [[ $ENCRYPT_DISK = "true" ]]
|
||||||
|
then
|
||||||
|
BOAT_LOADER_OPTIONS="cryptdevice=UUID=${DISKUUID}:${ROOT_PARTITION_MAP_NAME}:allow-discards "
|
||||||
|
fi
|
||||||
|
BOAT_LOADER_OPTIONS="${BOAT_LOADER_OPTIONS}root=${ROOT_PARTITION_MAP} "
|
||||||
|
BOAT_LOADER_OPTIONS="${BOAT_LOADER_OPTIONS}rootflags=subvol=@elfRoot "
|
||||||
|
if [[ $ENCRYPT_DISK = "true" ]]
|
||||||
|
then
|
||||||
|
BOAT_LOADER_OPTIONS="${BOAT_LOADER_OPTIONS}rd.luks.options=discard "
|
||||||
|
fi
|
||||||
|
BOAT_LOADER_OPTIONS="${BOAT_LOADER_OPTIONS}rw"
|
||||||
run-chroot "install systemd-boot" "bootctl install"
|
run-chroot "install systemd-boot" "bootctl install"
|
||||||
run-chroot "create boot config for main" "cat >/boot/loader/entries/arch.conf <<EOF
|
run-chroot "create boot config for main" "cat >/boot/loader/entries/arch.conf <<EOF
|
||||||
title E.L.F. OS
|
title E.L.F. OS
|
||||||
linux /vmlinuz-linux
|
linux /vmlinuz-linux
|
||||||
initrd /initramfs-linux.img
|
initrd /initramfs-linux.img
|
||||||
options cryptdevice=UUID=$DISKUUID:cryptelfroot:allow-discards root=/dev/mapper/cryptelfroot rootflags=subvol=@elfRoot rd.luks.options=discard rw
|
options ${BOAT_LOADER_OPTIONS}
|
||||||
EOF
|
EOF
|
||||||
"
|
"
|
||||||
run-chroot "create boot config fallback" "cat >/boot/loader/entries/arch-fallback.conf <<EOF
|
run-chroot "create boot config fallback" "cat >/boot/loader/entries/arch-fallback.conf <<EOF
|
||||||
title E.L.F. OS fallback
|
title E.L.F. OS fallback
|
||||||
linux /vmlinuz-linux
|
linux /vmlinuz-linux
|
||||||
initrd /initramfs-linux-fallback.img
|
initrd /initramfs-linux-fallback.img
|
||||||
options cryptdevice=UUID=$DISKUUID:cryptelfroot:allow-discards root=/dev/mapper/cryptelfroot rootflags=subvol=@elfRoot rd.luks.options=discard rw
|
options ${BOAT_LOADER_OPTIONS}
|
||||||
EOF
|
EOF
|
||||||
"
|
"
|
||||||
run-chroot "create main boot config" "cat >/boot/loader/loader.conf <<EOF
|
run-chroot "create main boot config" "cat >/boot/loader/loader.conf <<EOF
|
||||||
@ -152,7 +179,7 @@ echo
|
|||||||
run-chroot "add .ssh dir to skel" "mkdir -p /etc/skel/.ssh"
|
run-chroot "add .ssh dir to skel" "mkdir -p /etc/skel/.ssh"
|
||||||
run-chroot "create admin group" "groupadd admin"
|
run-chroot "create admin group" "groupadd admin"
|
||||||
run-chroot "create user" "useradd --home-dir /home/${USERNAME} --create-home --skel /etc/skel ${USERNAME} --groups admin"
|
run-chroot "create user" "useradd --home-dir /home/${USERNAME} --create-home --skel /etc/skel ${USERNAME} --groups admin"
|
||||||
run-chroot "set password for user" "echo \"${USERNAME}:$PASS_USER\" | chpasswd"
|
arch-chroot /mnt bash -c "echo \"${USERNAME}:\$PASS_USER\" | chpasswd" # don't log the password
|
||||||
run-chroot "add user to sudoers" "echo \"%admin ALL=(ALL:ALL) ALL\" >>/etc/sudoers"
|
run-chroot "add user to sudoers" "echo \"%admin ALL=(ALL:ALL) ALL\" >>/etc/sudoers"
|
||||||
run "clone keys repo" "git clone https://gitea.finnvanreenen.nl/FReenen/keys.git /mnt/opt/keys"
|
run "clone keys repo" "git clone https://gitea.finnvanreenen.nl/FReenen/keys.git /mnt/opt/keys"
|
||||||
run-chroot "create authoized keys" "cd /opt/keys/ssh && cat ${USER_SSH_KEYS} > /home/${USERNAME}/.ssh/authorized_keys"
|
run-chroot "create authoized keys" "cd /opt/keys/ssh && cat ${USER_SSH_KEYS} > /home/${USERNAME}/.ssh/authorized_keys"
|
||||||
@ -186,8 +213,8 @@ WantedBy=multi-user.target
|
|||||||
EOF
|
EOF
|
||||||
"
|
"
|
||||||
run-chroot "enable first boot service" "systemctl enable first_boot.service"
|
run-chroot "enable first boot service" "systemctl enable first_boot.service"
|
||||||
run "copy install log to disk" "mkdir /mnt/var/log/elfOS"
|
run "make elfOS log dir" "mkdir /mnt/var/log/elfOS && chmod 700 /mnt/var/log/elfOS"
|
||||||
run "copy install log to disk" "cp $SCRIPT_DIR/install.log /mnt/var/log/elfOS/install.log"
|
run "copy install log to disk" "cp $SCRIPT_DIR/install.log /mnt/var/log/elfOS/install.log && chmod 700 /mnt/var/log/elfOS/install.log"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo === umount and reboot
|
echo === umount and reboot
|
||||||
|
|||||||
@ -33,7 +33,7 @@ run root "start NetworkMaanger" "systemctl start NetworkManager.se
|
|||||||
run root "wait for network" "while [[ 1 ]] ; do ping -c1 1.1.1.1 && break ; done"
|
run root "wait for network" "while [[ 1 ]] ; do ping -c1 1.1.1.1 && break ; done"
|
||||||
run root "install base tools" "pacman -Sy --noconfirm \
|
run root "install base tools" "pacman -Sy --noconfirm \
|
||||||
usbutils dosfstools exfat-utils net-tools bind nmap libfido2 \
|
usbutils dosfstools exfat-utils net-tools bind nmap libfido2 \
|
||||||
base-devel vim curl ncdu neofetch btop git flatpak"
|
base-devel vim curl ncdu neofetch btop git flatpak screen"
|
||||||
run root "install dev tools" "pacman -S --noconfirm ansible python3 gcc make cmake" # clangd
|
run root "install dev tools" "pacman -S --noconfirm ansible python3 gcc make cmake" # clangd
|
||||||
run root "install gnome" "pacman -S --noconfirm gnome"
|
run root "install gnome" "pacman -S --noconfirm gnome"
|
||||||
run root "enable gnome" "systemctl enable gdm.service"
|
run root "enable gnome" "systemctl enable gdm.service"
|
||||||
@ -105,6 +105,8 @@ install_flatpak org.gnome.Rhythmbox3
|
|||||||
install_flatpak com.prusa3d.PrusaSlicer
|
install_flatpak com.prusa3d.PrusaSlicer
|
||||||
install_flatpak org.freecadweb.FreeCAD #TODO: install nightly instad
|
install_flatpak org.freecadweb.FreeCAD #TODO: install nightly instad
|
||||||
install_flatpak org.kicad.KiCad
|
install_flatpak org.kicad.KiCad
|
||||||
|
install_flatpak org.openscad.OpenSCAD
|
||||||
|
install_flatpak org.videolan.VLC
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo === install vscodium
|
echo === install vscodium
|
||||||
@ -157,11 +159,13 @@ EOF"
|
|||||||
if [[ $HOSTNAME == "elfDesktop" ]]
|
if [[ $HOSTNAME == "elfDesktop" ]]
|
||||||
then
|
then
|
||||||
|
|
||||||
|
run root "install amd-ucode" "pacman -S --noconfirm amd-ucode"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo === install Jellyfin Server
|
echo === install Jellyfin Server
|
||||||
echo
|
echo
|
||||||
|
|
||||||
run root "install Jellifin-server" "pacman -S --noconfirm jellifin-server"
|
run root "install Jellifin-server" "pacman -S --noconfirm jellifin-server jellifin-web"
|
||||||
run root "add media disk to fstab" "cat >>/etc/fstab <<EOF
|
run root "add media disk to fstab" "cat >>/etc/fstab <<EOF
|
||||||
|
|
||||||
# data disk
|
# data disk
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user