Compare commits
13
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9b15fd5159
|
||
|
|
0c03548307
|
||
|
|
61b61b6445
|
||
|
|
2787921679
|
||
|
|
cf18778af1
|
||
|
|
c32c9abcd1
|
||
|
|
c293990fa2
|
||
|
|
cd8baf67e5
|
||
|
|
2ebb72620b
|
||
|
|
25afed7541
|
||
|
|
b8b5918feb
|
||
|
|
fd177fa071
|
||
|
|
aaa209a056
|
@@ -1,231 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
baseDir="$(realpath "$(dirname "${0}")")"
|
||||
|
||||
source \
|
||||
/etc/os-release
|
||||
source \
|
||||
"${baseDir}/system.conf"
|
||||
|
||||
|
||||
if [[ "${1}" == '--live' ]]; then
|
||||
if [[ "${ID}" == 'debian' ]] && [[ ! "$(hostname)" == "debian-live" ]]; then
|
||||
cat << EOF | tee /etc/apt/sources.list.d/contrib.sources 1> /dev/null
|
||||
Enabled: yes
|
||||
Types: deb
|
||||
URIs: http://deb.debian.org/debian/
|
||||
Suites: ${VERSION_CODENAME}
|
||||
Components: contrib
|
||||
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
|
||||
EOF
|
||||
fi
|
||||
|
||||
apt \
|
||||
--update \
|
||||
install \
|
||||
--yes \
|
||||
mmdebstrap \
|
||||
gdisk \
|
||||
linux-headers-generic \
|
||||
systemd-timesyncd \
|
||||
whois \
|
||||
zfsutils-linux
|
||||
fi
|
||||
|
||||
if [[ "${1}" == '--mmdebstrap' ]]; then
|
||||
packages=(\
|
||||
ca-certificates \
|
||||
console-setup \
|
||||
cryptsetup \
|
||||
curl \
|
||||
dosfstools \
|
||||
dpkg-dev \
|
||||
efibootmgr \
|
||||
ethtool \
|
||||
firmware-{ast,atheros,bnx{2,2x},brcm80211,iwlwifi,libertas,linux,realtek,zd1211} \
|
||||
flatpak \
|
||||
keyboard-configuration \
|
||||
linux-{headers,image}-amd64 \
|
||||
locales \
|
||||
nano \
|
||||
network-manager \
|
||||
openssh-{client,server} \
|
||||
popularity-contest \
|
||||
printer-driver-all \
|
||||
rsync \
|
||||
systemd-timesyncd \
|
||||
tasksel \
|
||||
zfs-initramfs \
|
||||
zstd\
|
||||
)
|
||||
|
||||
include="--include=${packages[0]}"
|
||||
|
||||
for ((i=1;i<${#packages[@]};i++)); do
|
||||
include+=" --include=${packages[${i}]}"
|
||||
done
|
||||
|
||||
mmdebstrap \
|
||||
--skip=check/empty \
|
||||
--components=main,non-free-firmware,contrib \
|
||||
--mode=root \
|
||||
--format=directory \
|
||||
${include} \
|
||||
"${VERSION_CODENAME}" \
|
||||
/mnt
|
||||
fi
|
||||
|
||||
if [[ "${1}" == '--network-interfaces' ]]; then
|
||||
networkInterface=($(ip -br addr show | sed 's| .*$||g' | grep -v '^lo' | grep -v 'tailscale' | grep -v '^wg'))
|
||||
shopt -s extglob
|
||||
|
||||
for ((i = 0; i < ${#networkInterface[@]}; i++)); do
|
||||
cat << EOF | tee /mnt/etc/network/interfaces.d/${networkInterface[$i]} &> /dev/null
|
||||
allow-hotplug ${networkInterface[$i]}
|
||||
iface ${networkInterface[$i]} inet dhcp
|
||||
EOF
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ "${1}" == '--sources' ]]; then
|
||||
cat << EOF | tee /mnt/etc/apt/sources.list.d/${VERSION_CODENAME}.sources &> /dev/null
|
||||
# ${VERSION_CODENAME^}
|
||||
Enabled: yes
|
||||
Types: deb deb-src
|
||||
URIs: http://deb.debian.org/debian/
|
||||
Suites: ${VERSION_CODENAME}
|
||||
Components: main non-free-firmware contrib
|
||||
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
|
||||
|
||||
# ${VERSION_CODENAME^} Security
|
||||
Enabled: yes
|
||||
Types: deb deb-src
|
||||
URIs: http://deb.debian.org/debian-security/
|
||||
Suites: ${VERSION_CODENAME}-security
|
||||
Components: main non-free-firmware contrib
|
||||
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
|
||||
|
||||
# ${VERSION_CODENAME^} Updates
|
||||
Enabled: yes
|
||||
Types: deb deb-src
|
||||
URIs: http://deb.debian.org/debian/
|
||||
Suites: ${VERSION_CODENAME}-updates
|
||||
Components: main non-free-firmware contrib
|
||||
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
|
||||
EOF
|
||||
|
||||
rm /mnt/etc/apt/sources.list
|
||||
fi
|
||||
|
||||
if [[ "${1}" == '--dpkg-reconfigure' ]]; then
|
||||
cat << EOF
|
||||
|
||||
Regardless of the language(s) you choose, be sure to enable 'en_US.UTF-8'!
|
||||
Press any key to continue...
|
||||
EOF
|
||||
|
||||
read -srn 1
|
||||
|
||||
dpkg-reconfigure \
|
||||
locales \
|
||||
tzdata \
|
||||
keyboard-configuration \
|
||||
console-setup
|
||||
fi
|
||||
|
||||
if [[ "${1}" == '--purge-os-prober' ]]; then
|
||||
apt \
|
||||
purge \
|
||||
--yes \
|
||||
os-prober
|
||||
fi
|
||||
|
||||
if [[ "${1}" == '--network-manager' ]]; then
|
||||
cp \
|
||||
/etc/NetworkManager/NetworkManager.conf \
|
||||
/etc/NetworkManager/NetworkManager.conf.orig
|
||||
|
||||
cat \
|
||||
/etc/NetworkManager/NetworkManager.conf.orig | \
|
||||
sed 's|managed=false|managed=true|' | \
|
||||
tee /etc/NetworkManager/NetworkManager.conf &> /dev/null
|
||||
fi
|
||||
|
||||
if [[ "${1}" == '--contrib' ]]; then
|
||||
cat << EOF | tee --append /etc/apt/sources.list.d/${VERSION_CODENAME}.sources &> /dev/null
|
||||
|
||||
# ${VERSION_CODENAME^} Backports
|
||||
Enabled: yes
|
||||
Types: deb deb-src
|
||||
URIs: http://deb.debian.org/debian/
|
||||
Suites: ${VERSION_CODENAME}-backports
|
||||
Components: main non-free-firmware contrib
|
||||
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
|
||||
EOF
|
||||
|
||||
cat << EOF | tee /etc/apt/preferences.d/backports.pref &> /dev/null
|
||||
Package: *
|
||||
Pin: release n=${VERSION_CODENAME}*
|
||||
Pin-Priority: 990
|
||||
|
||||
Package: linux-*
|
||||
Pin: release n=${VERSION_CODENAME}-backports
|
||||
Pin-Priority: -1
|
||||
EOF
|
||||
|
||||
if [[ "${VERSION_CODENAME}" == 'bookworm' ]]; then
|
||||
cat << EOF | tee --append /etc/apt/preferences.d/backports.pref &> /dev/null
|
||||
|
||||
Package: /wayland/
|
||||
Pin: release n=${VERSION_CODENAME}-backports
|
||||
Pin-Priority: -1
|
||||
EOF
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "${1}" == '--tasksel' ]]; then
|
||||
if [[ ! -f /usr/bin/tasksel ]]; then
|
||||
apt \
|
||||
--update \
|
||||
install \
|
||||
--yes \
|
||||
tasksel
|
||||
fi
|
||||
|
||||
tasksel \
|
||||
--new-install
|
||||
fi
|
||||
|
||||
if [[ "${1}" == '--initramfs' ]]; then
|
||||
printf \
|
||||
"UMASK=0077\n" | \
|
||||
tee /etc/initramfs-tools/conf.d/umask.conf &> /dev/null
|
||||
|
||||
update-initramfs \
|
||||
-c \
|
||||
-k all
|
||||
fi
|
||||
|
||||
if [[ "${1}" == '--logrotate' ]]; then
|
||||
for file in /etc/logrotate.d/* ; do
|
||||
if grep -Eq "(^|[^#y])compress" "$file" ; then
|
||||
sed -i -r "s/(^|[^#y])(compress)/\1#\2/" "$file"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ "${1}" == '--systemctl-enable' ]]; then
|
||||
systemctl \
|
||||
enable \
|
||||
zfs.target
|
||||
systemctl \
|
||||
enable \
|
||||
zfs-import-cache
|
||||
systemctl \
|
||||
enable \
|
||||
zfs-mount
|
||||
systemctl \
|
||||
enable \
|
||||
zfs-import.target
|
||||
fi
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
source \
|
||||
/etc/os-release
|
||||
|
||||
|
||||
cat << EOF | tee --append /etc/apt/sources.list.d/${VERSION_CODENAME}.sources &> /dev/null
|
||||
|
||||
# ${VERSION_CODENAME^} Backports
|
||||
Enabled: yes
|
||||
Types: deb deb-src
|
||||
URIs: http://deb.debian.org/debian/
|
||||
Suites: ${VERSION_CODENAME}-backports
|
||||
Components: main non-free-firmware contrib
|
||||
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
|
||||
EOF
|
||||
|
||||
cat << EOF | tee /etc/apt/preferences.d/backports.pref &> /dev/null
|
||||
Package: *
|
||||
Pin: release n=${VERSION_CODENAME}*
|
||||
Pin-Priority: 990
|
||||
|
||||
Package: linux-*
|
||||
Pin: release n=${VERSION_CODENAME}-backports
|
||||
Pin-Priority: -1
|
||||
EOF
|
||||
|
||||
if [[ "${VERSION_CODENAME}" == 'bookworm' ]]; then
|
||||
cat << EOF | tee --append /etc/apt/preferences.d/backports.pref &> /dev/null
|
||||
|
||||
Package: /wayland/
|
||||
Pin: release n=${VERSION_CODENAME}-backports
|
||||
Pin-Priority: -1
|
||||
EOF
|
||||
fi
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
|
||||
cat << EOF
|
||||
|
||||
Regardless of the language(s) you choose, be sure to enable 'en_US.UTF-8'!
|
||||
Press any key to continue...
|
||||
EOF
|
||||
|
||||
read -srn 1
|
||||
|
||||
dpkg-reconfigure \
|
||||
locales \
|
||||
tzdata \
|
||||
keyboard-configuration \
|
||||
console-setup
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
|
||||
printf \
|
||||
"UMASK=0077\n" | \
|
||||
tee /etc/initramfs-tools/conf.d/umask.conf &> /dev/null
|
||||
|
||||
update-initramfs \
|
||||
-c \
|
||||
-k all
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
source \
|
||||
/etc/os-release
|
||||
|
||||
|
||||
if [[ "${ID}" == 'debian' ]] && [[ ! "$(hostname)" == "debian-live" ]]; then
|
||||
cat << EOF | tee /etc/apt/sources.list.d/contrib.sources 1> /dev/null
|
||||
Enabled: yes
|
||||
Types: deb
|
||||
URIs: http://deb.debian.org/debian/
|
||||
Suites: ${VERSION_CODENAME}
|
||||
Components: contrib
|
||||
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
|
||||
EOF
|
||||
fi
|
||||
|
||||
apt \
|
||||
--update \
|
||||
install \
|
||||
--yes \
|
||||
mmdebstrap \
|
||||
gdisk \
|
||||
linux-headers-$(uname -r) \
|
||||
systemd-timesyncd \
|
||||
wget \
|
||||
whois \
|
||||
zfsutils-linux
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
|
||||
for file in /etc/logrotate.d/* ; do
|
||||
if grep -Eq "(^|[^#y])compress" "$file" ; then
|
||||
sed -i -r "s/(^|[^#y])(compress)/\1#\2/" "$file"
|
||||
fi
|
||||
done
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
source \
|
||||
/etc/os-release
|
||||
|
||||
|
||||
packages=( \
|
||||
ca-certificates \
|
||||
console-setup \
|
||||
cryptsetup \
|
||||
dosfstools \
|
||||
dpkg-dev \
|
||||
efibootmgr \
|
||||
ethtool \
|
||||
firmware-{ast,atheros,bnx{2,2x},brcm80211,iwlwifi,libertas,linux,realtek,zd1211} \
|
||||
flatpak \
|
||||
keyboard-configuration \
|
||||
linux-{headers,image}-amd64 \
|
||||
locales \
|
||||
nano \
|
||||
network-manager \
|
||||
openssh-{client,server} \
|
||||
popularity-contest \
|
||||
printer-driver-all \
|
||||
rsync \
|
||||
sudo \
|
||||
systemd-timesyncd \
|
||||
tasksel \
|
||||
wget \
|
||||
zfs-initramfs \
|
||||
zstd \
|
||||
)
|
||||
|
||||
include="${packages[0]}"
|
||||
|
||||
for ((i=1;i<${#packages[@]};i++)); do
|
||||
include+=",${packages[${i}]}"
|
||||
done
|
||||
|
||||
mmdebstrap \
|
||||
--skip=check/empty \
|
||||
--components=main,non-free-firmware,contrib \
|
||||
--mode=root \
|
||||
--format=directory \
|
||||
--include="${include}" \
|
||||
"${VERSION_CODENAME}" \
|
||||
/mnt
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
|
||||
networkInterface=($(ip -br addr show | awk '!/^lo/&&!/tailscale/&&!/^wg/{print$1}'))
|
||||
shopt -s extglob
|
||||
|
||||
for ((i = 0; i < ${#networkInterface[@]}; i++)); do
|
||||
cat << EOF | tee /mnt/etc/network/interfaces.d/${networkInterface[$i]} &> /dev/null
|
||||
allow-hotplug ${networkInterface[$i]}
|
||||
iface ${networkInterface[$i]} inet dhcp
|
||||
EOF
|
||||
done
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
|
||||
cp \
|
||||
/etc/NetworkManager/NetworkManager.conf \
|
||||
/etc/NetworkManager/NetworkManager.conf.orig
|
||||
|
||||
cat \
|
||||
/etc/NetworkManager/NetworkManager.conf.orig | \
|
||||
sed 's|managed=false|managed=true|' | \
|
||||
tee /etc/NetworkManager/NetworkManager.conf &> /dev/null
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
|
||||
apt \
|
||||
purge \
|
||||
--yes \
|
||||
os-prober
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
source \
|
||||
/etc/os-release
|
||||
|
||||
|
||||
cat << EOF | tee /mnt/etc/apt/sources.list.d/${VERSION_CODENAME}.sources &> /dev/null
|
||||
# ${VERSION_CODENAME^}
|
||||
Enabled: yes
|
||||
Types: deb deb-src
|
||||
URIs: http://deb.debian.org/debian/
|
||||
Suites: ${VERSION_CODENAME}
|
||||
Components: main non-free-firmware contrib
|
||||
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
|
||||
|
||||
# ${VERSION_CODENAME^} Security
|
||||
Enabled: yes
|
||||
Types: deb deb-src
|
||||
URIs: http://deb.debian.org/debian-security/
|
||||
Suites: ${VERSION_CODENAME}-security
|
||||
Components: main non-free-firmware contrib
|
||||
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
|
||||
|
||||
# ${VERSION_CODENAME^} Updates
|
||||
Enabled: yes
|
||||
Types: deb deb-src
|
||||
URIs: http://deb.debian.org/debian/
|
||||
Suites: ${VERSION_CODENAME}-updates
|
||||
Components: main non-free-firmware contrib
|
||||
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
|
||||
EOF
|
||||
|
||||
if [[ -f '/mnt/etc/apt/sources.list' ]]; then
|
||||
rm \
|
||||
/mnt/etc/apt/sources.list
|
||||
fi
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
|
||||
systemctl \
|
||||
enable \
|
||||
zfs.target
|
||||
systemctl \
|
||||
enable \
|
||||
zfs-import-cache
|
||||
systemctl \
|
||||
enable \
|
||||
zfs-mount
|
||||
systemctl \
|
||||
enable \
|
||||
zfs-import.target
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
|
||||
if [[ ! -f /usr/bin/tasksel ]]; then
|
||||
apt \
|
||||
--update \
|
||||
install \
|
||||
--yes \
|
||||
tasksel
|
||||
fi
|
||||
|
||||
tasksel \
|
||||
--new-install
|
||||
@@ -17,34 +17,19 @@ mkdir \
|
||||
-p \
|
||||
/boot/efi/EFI/BOOT
|
||||
|
||||
curl \
|
||||
--progress-bar \
|
||||
--show-error \
|
||||
--output \
|
||||
wget \
|
||||
--output-document \
|
||||
/boot/efi/EFI/ZBM/VMLINUZ.EFI \
|
||||
--location \
|
||||
https://get.zfsbootmenu.org/efi
|
||||
|
||||
rsync \
|
||||
-pogAXtlHrDx \
|
||||
--stats \
|
||||
--info=progress2 \
|
||||
/boot/efi/EFI/ZBM/VMLINUZ.EFI \
|
||||
/boot/efi/EFI/ZBM/VMLINUZ-BACKUP.EFI
|
||||
|
||||
rsync \
|
||||
-pogAXtlHrDx \
|
||||
--stats \
|
||||
--info=progress2 \
|
||||
/boot/efi/EFI/ZBM/VMLINUZ.EFI \
|
||||
/boot/efi/EFI/BOOT/BOOTX64.EFI
|
||||
|
||||
rsync \
|
||||
-pogAXtlHrDx \
|
||||
--stats \
|
||||
--info=progress2 \
|
||||
/boot/efi/EFI/ZBM/VMLINUZ.EFI \
|
||||
/boot/efi/EFI/BOOT/shellx64.efi
|
||||
for file in {ZBM/VMLINUZ-BACKUP,BOOT/{BOOTX64,shellx64}}; do
|
||||
rsync \
|
||||
-pogAXtlHrDx \
|
||||
--stats \
|
||||
--info=progress2 \
|
||||
/boot/efi/EFI/ZBM/VMLINUZ.EFI \
|
||||
/boot/efi/EFI/${file}.EFI
|
||||
done
|
||||
|
||||
efibootmgr \
|
||||
-c \
|
||||
|
||||
+7
-10
@@ -13,7 +13,6 @@ if [[ "${1}" == '--mmdebstrap' ]]; then
|
||||
packages=(\
|
||||
console-setup \
|
||||
cryptsetup \
|
||||
curl \
|
||||
dosfstools \
|
||||
dpkg-dev \
|
||||
efibootmgr \
|
||||
@@ -27,14 +26,15 @@ network-manager \
|
||||
openssh-{client,server} \
|
||||
popularity-contest \
|
||||
rsync \
|
||||
wget \
|
||||
zfs-initramfs \
|
||||
zstd\
|
||||
)
|
||||
|
||||
include="--include=${packages[0]}"
|
||||
include="${packages[0]}"
|
||||
|
||||
for ((i=1;i<${#packages[@]};i++)); do
|
||||
include+=" --include=${packages[${i}]}"
|
||||
include+=",${packages[${i}]}"
|
||||
done
|
||||
|
||||
mmdebstrap \
|
||||
@@ -42,7 +42,7 @@ zstd\
|
||||
--components=main,restricted,universe,multiverse \
|
||||
--mode=root \
|
||||
--format=directory \
|
||||
${include} \
|
||||
--include=${include} \
|
||||
"${UBUNTU_VERSION_CODENAME}" \
|
||||
/mnt
|
||||
fi
|
||||
@@ -170,12 +170,9 @@ if [[ "${1}" == '--desktop' ]]; then
|
||||
fi
|
||||
|
||||
if [[ "${1}" == '--namarupa' ]]; then
|
||||
curl \
|
||||
--progress \
|
||||
--location \
|
||||
--remote-name \
|
||||
--continue-at - \
|
||||
--output-dir '/tmp' \
|
||||
wget \
|
||||
--continue \
|
||||
--directory-prefix '/tmp' \
|
||||
'https://github.com/lenemter/wingpanel-indicator-namarupa/raw/main/com.github.lenemter.wingpanel-indicator-namarupa.deb'
|
||||
|
||||
apt \
|
||||
|
||||
+7
-7
@@ -39,14 +39,14 @@ if [[ "${ID}" == 'fedora' ]]; then
|
||||
fi
|
||||
|
||||
if [[ "${ID}" == 'debian' ]] || [[ "${ID}" == 'elementary' ]]; then
|
||||
"${baseDir}/debian.sh" --dpkg-reconfigure
|
||||
"${baseDir}/debian/dpkg-reconfigure.sh"
|
||||
fi
|
||||
|
||||
"${baseDir}/partition.sh" --efi
|
||||
|
||||
if [[ "${ID}" == 'debian' ]] || [[ "${ID}" == 'elementary' ]]; then
|
||||
if [[ -e '/usr/bin/os-prober' ]]; then
|
||||
"${baseDir}/debian.sh" --purge-os-prober
|
||||
"${baseDir}/debian/purge-os-prober.sh"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -74,25 +74,25 @@ printf \
|
||||
"${baseDir}/swap.sh"
|
||||
|
||||
if [[ "${ID}" == 'debian' ]]; then
|
||||
"${baseDir}/debian.sh" --network-manager
|
||||
"${baseDir}/debian/network-manager.sh"
|
||||
fi
|
||||
|
||||
if [[ "${ID}" == 'debian' ]] || [[ "${ID}" == 'elementary' ]]; then
|
||||
"${baseDir}/debian.sh" --initramfs
|
||||
"${baseDir}/debian/initramfs.sh"
|
||||
elif [[ "${ID}" == 'fedora' ]]; then
|
||||
"${baseDir}/fedora.sh" --dracut
|
||||
fi
|
||||
|
||||
"${baseDir}/zfs.sh" --splash
|
||||
"${baseDir}/zfs/splash.sh"
|
||||
|
||||
if [[ ! -z "$(zfs list | grep 'keystore')" ]]; then
|
||||
"${baseDir}/zfs.sh" --keystore
|
||||
"${baseDir}/zfs/keystore.sh"
|
||||
fi
|
||||
|
||||
"${baseDir}/efi.sh"
|
||||
|
||||
if [[ "${ID}" == 'debian' ]] || [[ "${ID}" == 'elementary' ]]; then
|
||||
"${baseDir}/debian.sh" --systemctl-enable
|
||||
"${baseDir}/debian/systemctl-enable.sh"
|
||||
fi
|
||||
|
||||
zfs \
|
||||
|
||||
@@ -5,9 +5,9 @@ set -euo pipefail
|
||||
baseDir="$(realpath "$(dirname "${0}")")"
|
||||
|
||||
|
||||
disksById="$(ls -Ago /dev/disk/by-id/ | grep -v 'sr' | grep -v 'dm-' | grep -v 'nvme-eui.' | grep -v '\-part' | grep -v 'wwn-' | grep -v '_[1-9] -> ' | grep -v 'total' | sed -e 's|^.*\:[0-5][0-9] ||g')"
|
||||
disks="$(lsblk -do name | grep -v 'loop' | grep -v 'sr' | grep -v 'zram' | grep -v 'NAME')"
|
||||
networkInterfaces="$(ip -br addr show | sed -e 's| .*$||g' | grep -v '^lo' | grep -v 'tailscale' | grep -v '^wg')"
|
||||
disksById="$(ls -Ago /dev/disk/by-id/ | awk '!/sr/&&!/dm-/&&!/nvme-eui\./&&!/\-part/&&!/wwn-/&&!/_[1-9] -> /&&NR!=1{print$7" -> "$9}')"
|
||||
disks="$(lsblk -do name | awk 'NR!=1&&!/loop/&&!/sr/&&!/zram/')"
|
||||
networkInterfaces="$(ip -br addr show | awk '!/^lo/&&!/tailscale/&&!/^wg/{print$1}')"
|
||||
|
||||
|
||||
cat << EOF
|
||||
|
||||
+4
-4
@@ -33,14 +33,14 @@ cat << EOF
|
||||
EOF
|
||||
|
||||
|
||||
"${baseDir}/zfs.sh" --home
|
||||
"${baseDir}/zfs/home.sh"
|
||||
|
||||
"${baseDir}/adduser.sh"
|
||||
|
||||
if [[ "${ID}" == 'elementary' ]]; then
|
||||
"${baseDir}/elementary.sh" --namarupa
|
||||
elif [[ "${ID}" == 'debian' ]]; then
|
||||
"${baseDir}/debian.sh" --contrib
|
||||
"${baseDir}/debian/contrib.sh"
|
||||
fi
|
||||
|
||||
if [[ "${ID}" == 'debian' ]] || [[ "${ID}" == 'elementary' ]]; then
|
||||
@@ -51,11 +51,11 @@ if [[ "${ID}" == 'debian' ]] || [[ "${ID}" == 'elementary' ]]; then
|
||||
fi
|
||||
|
||||
if [[ "${ID}" = 'debian' ]]; then
|
||||
"${baseDir}/debian.sh" --tasksel
|
||||
"${baseDir}/debian/tasksel.sh"
|
||||
fi
|
||||
|
||||
if [[ "${ID}" == 'debian' ]] || [[ "${ID}" == 'elementary' ]]; then
|
||||
"${baseDir}/debian.sh" --logrotate
|
||||
"${baseDir}/debian/logrotate.sh"
|
||||
|
||||
"${baseDir}/apt-snapshot.sh"
|
||||
fi
|
||||
|
||||
+9
-9
@@ -40,7 +40,7 @@ if [[ -f '/usr/bin/gsettings' ]]; then
|
||||
fi
|
||||
|
||||
if [[ "${ID}" == 'debian' ]] || [[ "${ID}" == 'elementary' ]]; then
|
||||
"${baseDir}/debian.sh" --live
|
||||
"${baseDir}/debian/live.sh"
|
||||
elif [[ "${ID}" == 'fedora' ]]; then
|
||||
"${baseDir}/fedora.sh" --live
|
||||
fi
|
||||
@@ -48,7 +48,7 @@ fi
|
||||
timedatectl
|
||||
|
||||
if [[ ! "$(hostname)" == "debian-live" ]]; then
|
||||
"${baseDir}/zfs.sh" --host-id
|
||||
"${baseDir}/zfs/host-id.sh"
|
||||
fi
|
||||
|
||||
|
||||
@@ -56,16 +56,16 @@ fi
|
||||
|
||||
sleep 5
|
||||
|
||||
"${baseDir}/zfs.sh" --format
|
||||
"${baseDir}/zfs/format.sh"
|
||||
|
||||
"${baseDir}/zfs.sh" --create
|
||||
"${baseDir}/zfs/create.sh"
|
||||
|
||||
"${baseDir}/mkdir-tmpfs.sh"
|
||||
|
||||
if [[ "${ID}" == 'elementary' ]]; then
|
||||
"${baseDir}/elementary.sh" --mmdebstrap
|
||||
elif [[ "${ID}" == 'debian' ]]; then
|
||||
"${baseDir}/debian.sh" --mmdebstrap
|
||||
"${baseDir}/debian/mmdebstrap.sh"
|
||||
elif [[ "${ID}" == 'fedora' ]]; then
|
||||
"${baseDir}/fedora.sh" --rsync
|
||||
fi
|
||||
@@ -73,7 +73,7 @@ fi
|
||||
"${baseDir}/hostname.sh"
|
||||
|
||||
if [[ "${ID}" == 'debian' ]]; then
|
||||
"${baseDir}/debian.sh" --network-interfaces
|
||||
"${baseDir}/debian/network-interfaces.sh"
|
||||
elif [[ "${ID}" == 'elementary' ]]; then
|
||||
"${baseDir}/elementary.sh" --network
|
||||
fi
|
||||
@@ -81,7 +81,7 @@ fi
|
||||
if [[ "${ID}" == 'elementary' ]]; then
|
||||
"${baseDir}/elementary.sh" --sources
|
||||
elif [[ "${ID}" == 'debian' ]]; then
|
||||
"${baseDir}/debian.sh" --sources
|
||||
"${baseDir}/debian/sources.sh"
|
||||
fi
|
||||
|
||||
"${baseDir}/mount.sh"
|
||||
@@ -99,7 +99,7 @@ if [[ "${ID}" == 'elementary' ]]; then
|
||||
fi
|
||||
|
||||
if [[ -f "/etc/zfs/keys/${hostname,,}.key" ]]; then
|
||||
"${baseDir}/zfs.sh" --key
|
||||
"${baseDir}/zfs/key.sh"
|
||||
fi
|
||||
|
||||
if [[ "${ID}" == 'elementary' ]]; then
|
||||
@@ -108,7 +108,7 @@ fi
|
||||
|
||||
"${baseDir}/chroot.sh" --continue
|
||||
|
||||
"${baseDir}/zfs.sh" --unmount
|
||||
"${baseDir}/zfs/unmount.sh"
|
||||
|
||||
printf \
|
||||
'\033[?47h\033[2J\033[H'
|
||||
|
||||
@@ -35,9 +35,9 @@ nmcli radio wifi on
|
||||
nmcli device wifi list
|
||||
|
||||
printf "Enter the SSID of the WiFi network you wish to connect to:\n"
|
||||
read -r WIFI_NAME
|
||||
read -r wifiName
|
||||
|
||||
nmcli --ask device wifi connect ${wifiName}
|
||||
nmcli --ask device wifi connect "${wifiName}"
|
||||
|
||||
cat << EOF
|
||||
|
||||
|
||||
@@ -1,282 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
baseDir="$(realpath "$(dirname "${0}")")"
|
||||
|
||||
source \
|
||||
/etc/os-release
|
||||
source \
|
||||
"${baseDir}/system.conf"
|
||||
|
||||
|
||||
if [[ ! "${disk}" == **/dev/disk/by-id/** ]]; then
|
||||
if [[ "${disk}" == **/dev/nvme** ]]; then
|
||||
part3='p3'
|
||||
else
|
||||
part3='3'
|
||||
fi
|
||||
else
|
||||
part3='-part3'
|
||||
fi
|
||||
|
||||
|
||||
if [[ "${1}" == '--format' ]]; then
|
||||
if [[ "${encryption}" == 'yes' ]]; then
|
||||
zpoolPassword='A'
|
||||
zpoolPasswordVerify='B'
|
||||
|
||||
printf \
|
||||
'\033[?47h\033[2J\033[H'
|
||||
|
||||
while [[ ! "${zpoolPassword}" == "${zpoolPasswordVerify}" ]] || [[ -z "${zpoolPassword}" ]] || [[ "${#zpoolPassword}" -lt '8' ]]; do
|
||||
printf \
|
||||
"Enter a password to encrypt your root pool (minimum 8 characters):\n"
|
||||
read \
|
||||
-r \
|
||||
-s \
|
||||
zpoolPassword
|
||||
|
||||
printf \
|
||||
"Verify the password to encrypt your root pool:\n"
|
||||
read \
|
||||
-r \
|
||||
-s \
|
||||
zpoolPasswordVerify
|
||||
|
||||
if [[ ! "${zpoolPassword}" == "${zpoolPasswordVerify}" ]]; then
|
||||
printf \
|
||||
"ERROR:\tPasswords do not match!\n\n"
|
||||
elif [[ -z "${zpoolPassword}" ]]; then
|
||||
printf \
|
||||
"ERROR:\tPassword is empty!\n\n"
|
||||
elif [[ "${#zpoolPassword}" -lt '8' ]]; then
|
||||
printf \
|
||||
"ERROR:\tPassword is too short!\n\n"
|
||||
fi
|
||||
done
|
||||
|
||||
printf \
|
||||
'\033[?47l'
|
||||
|
||||
mkdir \
|
||||
-p \
|
||||
/etc/zfs/keys/
|
||||
|
||||
printf \
|
||||
"${zpoolPassword}\n" | tee /etc/zfs/keys/${hostname,,}.key &> /dev/null
|
||||
|
||||
chmod \
|
||||
000 \
|
||||
/etc/zfs/keys/${hostname,,}.key
|
||||
|
||||
zpool create \
|
||||
-o ashift=12 \
|
||||
-o autotrim=on \
|
||||
-o compatibility=openzfs-2.1-linux \
|
||||
-O encryption=on \
|
||||
-O keylocation=file:///etc/zfs/keys/${hostname,,}.key \
|
||||
-O keyformat=passphrase \
|
||||
-O acltype=posixacl \
|
||||
-O xattr=sa \
|
||||
-O dnodesize=auto \
|
||||
-O compression=zstd-3 \
|
||||
-O normalization=formD \
|
||||
-O relatime=on \
|
||||
-O canmount=off \
|
||||
-O mountpoint=/ \
|
||||
-R /mnt \
|
||||
${hostname,,} \
|
||||
${disk}${part3}
|
||||
else
|
||||
zpool create \
|
||||
-o ashift=12 \
|
||||
-o autotrim=on \
|
||||
-o compatibility=openzfs-2.1-linux \
|
||||
-O encryption=off \
|
||||
-O acltype=posixacl \
|
||||
-O xattr=sa \
|
||||
-O dnodesize=auto \
|
||||
-O compression=zstd-3 \
|
||||
-O normalization=formD \
|
||||
-O relatime=on \
|
||||
-O canmount=off \
|
||||
-O mountpoint=/ \
|
||||
-R /mnt \
|
||||
${hostname,,} \
|
||||
${disk}${part3}
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "${1}" == '--create' ]]; then
|
||||
zfs create \
|
||||
-o canmount=off \
|
||||
-o mountpoint=none \
|
||||
${hostname,,}/ROOT
|
||||
|
||||
zfs create \
|
||||
-o canmount=noauto \
|
||||
-o mountpoint=/ \
|
||||
${hostname,,}/ROOT/${ID}
|
||||
|
||||
zfs mount \
|
||||
${hostname,,}/ROOT/${ID}
|
||||
|
||||
zfs create \
|
||||
${hostname,,}/home
|
||||
|
||||
zfs create \
|
||||
-o mountpoint=/root \
|
||||
${hostname,,}/home/root
|
||||
|
||||
chmod \
|
||||
700 \
|
||||
/mnt/root
|
||||
|
||||
zfs create \
|
||||
-o canmount=off \
|
||||
-o mountpoint=/var \
|
||||
${hostname,,}/var
|
||||
|
||||
zfs create \
|
||||
-o canmount=off \
|
||||
${hostname,,}/var/lib
|
||||
|
||||
zfs create \
|
||||
${hostname,,}/var/log
|
||||
|
||||
zfs create \
|
||||
${hostname,,}/var/spool
|
||||
|
||||
zfs create \
|
||||
-o com.sun:auto-snapshot=false \
|
||||
${hostname,,}/var/cache
|
||||
|
||||
zfs create \
|
||||
-o com.sun:auto-snapshot=false \
|
||||
${hostname,,}/var/lib/nfs
|
||||
|
||||
zfs create \
|
||||
-o com.sun:auto-snapshot=false \
|
||||
${hostname,,}/var/tmp
|
||||
|
||||
chmod \
|
||||
1777 \
|
||||
/mnt/var/tmp
|
||||
|
||||
zfs create \
|
||||
-o mountpoint=/srv \
|
||||
${hostname,,}/srv
|
||||
|
||||
zfs create \
|
||||
-o canmount=off \
|
||||
-o mountpoint=/usr \
|
||||
${hostname,,}/usr
|
||||
|
||||
zfs create \
|
||||
${hostname,,}/usr/local
|
||||
|
||||
zfs create \
|
||||
${hostname,,}/var/games
|
||||
|
||||
zfs create \
|
||||
${hostname,,}/var/lib/AccountsService
|
||||
|
||||
zfs create \
|
||||
${hostname,,}/var/lib/NetworkManager
|
||||
|
||||
zfs create \
|
||||
${hostname,,}/var/www
|
||||
|
||||
zfs create \
|
||||
-o com.sun:auto-snapshot=false \
|
||||
-o mountpoint=/tmp \
|
||||
${hostname,,}/tmp
|
||||
|
||||
if [[ "${encryption}" == 'yes' ]]; then
|
||||
zfs create \
|
||||
-o com.sun:auto-snapshot=false \
|
||||
-o mountpoint=/etc/zfs/keys \
|
||||
${hostname,,}/keystore
|
||||
fi
|
||||
|
||||
zpool set \
|
||||
bootfs=${hostname,,}/ROOT/${ID} \
|
||||
${hostname,,}
|
||||
|
||||
if [[ "${ID}" == 'fedora' ]]; then
|
||||
"${baseDir}/fedora.sh" --rsync
|
||||
fi
|
||||
|
||||
zfs create \
|
||||
${hostname,,}/var/mail
|
||||
|
||||
chmod \
|
||||
1777 \
|
||||
/mnt/tmp
|
||||
fi
|
||||
|
||||
if [[ "${1}" == '--key' ]]; then
|
||||
cp \
|
||||
/etc/zfs/keys/${hostname,,}.key \
|
||||
/mnt/etc/zfs/keys/
|
||||
fi
|
||||
|
||||
if [[ "${1}" == '--unmount' ]]; then
|
||||
mount | grep -v zfs | tac | awk '/\/mnt/ {print $3}' | xargs -I {} umount -lf {}
|
||||
|
||||
if [[ "${ID}" == 'fedora' ]]; then
|
||||
umount \
|
||||
-nR \
|
||||
/mnt
|
||||
fi
|
||||
|
||||
zpool \
|
||||
export \
|
||||
-a
|
||||
fi
|
||||
|
||||
if [[ "${1}" == '--host-id' ]]; then
|
||||
zgenhostid \
|
||||
-f \
|
||||
0x00bab10c
|
||||
fi
|
||||
|
||||
if [[ "${1}" == '--home' ]]; then
|
||||
zfs create\
|
||||
${hostname,,}/home/${username}
|
||||
|
||||
zfs create\
|
||||
${hostname,,}/home/${username}/.config
|
||||
|
||||
zfs create\
|
||||
-o canmount=off\
|
||||
${hostname,,}/home/${username}/.var
|
||||
|
||||
zfs create\
|
||||
${hostname,,}/home/${username}/.var/app
|
||||
|
||||
zfs create\
|
||||
-o canmount=off\
|
||||
${hostname,,}/home/${username}/.local
|
||||
|
||||
zfs create\
|
||||
-o canmount=off\
|
||||
${hostname,,}/home/${username}/.local/share
|
||||
|
||||
zfs create\
|
||||
${hostname,,}/home/${username}/.local/share/flatpak
|
||||
fi
|
||||
|
||||
if [[ "${1}" == '--keystore' ]]; then
|
||||
zfs \
|
||||
set \
|
||||
org.zfsbootmenu:keysource=${hostname,,}/keystore \
|
||||
${hostname,,}
|
||||
fi
|
||||
|
||||
if [[ "${1}" == '--splash' ]]; then
|
||||
zfs \
|
||||
set \
|
||||
org.zfsbootmenu:commandline='quiet splash rhgb noresume' \
|
||||
${hostname,,}/ROOT/${ID}
|
||||
fi
|
||||
Executable
+116
@@ -0,0 +1,116 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
baseDir="$(realpath "$(dirname "${0}")/../")"
|
||||
|
||||
source \
|
||||
/etc/os-release
|
||||
source \
|
||||
"${baseDir}/system.conf"
|
||||
|
||||
|
||||
zfs create \
|
||||
-o canmount=off \
|
||||
-o mountpoint=none \
|
||||
${hostname,,}/ROOT
|
||||
|
||||
zfs create \
|
||||
-o canmount=noauto \
|
||||
-o mountpoint=/ \
|
||||
${hostname,,}/ROOT/${ID}
|
||||
|
||||
zfs mount \
|
||||
${hostname,,}/ROOT/${ID}
|
||||
|
||||
zfs create \
|
||||
${hostname,,}/home
|
||||
|
||||
zfs create \
|
||||
-o mountpoint=/root \
|
||||
${hostname,,}/home/root
|
||||
|
||||
chmod \
|
||||
700 \
|
||||
/mnt/root
|
||||
|
||||
zfs create \
|
||||
-o canmount=off \
|
||||
-o mountpoint=/var \
|
||||
${hostname,,}/var
|
||||
|
||||
zfs create \
|
||||
-o canmount=off \
|
||||
${hostname,,}/var/lib
|
||||
|
||||
zfs create \
|
||||
${hostname,,}/var/log
|
||||
|
||||
zfs create \
|
||||
${hostname,,}/var/spool
|
||||
|
||||
zfs create \
|
||||
-o com.sun:auto-snapshot=false \
|
||||
${hostname,,}/var/cache
|
||||
|
||||
zfs create \
|
||||
-o com.sun:auto-snapshot=false \
|
||||
${hostname,,}/var/lib/nfs
|
||||
|
||||
zfs create \
|
||||
-o com.sun:auto-snapshot=false \
|
||||
${hostname,,}/var/tmp
|
||||
|
||||
chmod \
|
||||
1777 \
|
||||
/mnt/var/tmp
|
||||
|
||||
zfs create \
|
||||
-o mountpoint=/srv \
|
||||
${hostname,,}/srv
|
||||
|
||||
zfs create \
|
||||
-o canmount=off \
|
||||
-o mountpoint=/usr \
|
||||
${hostname,,}/usr
|
||||
|
||||
zfs create \
|
||||
${hostname,,}/usr/local
|
||||
|
||||
zfs create \
|
||||
${hostname,,}/var/games
|
||||
|
||||
zfs create \
|
||||
${hostname,,}/var/lib/AccountsService
|
||||
|
||||
zfs create \
|
||||
${hostname,,}/var/lib/NetworkManager
|
||||
|
||||
zfs create \
|
||||
${hostname,,}/var/www
|
||||
|
||||
zfs create \
|
||||
-o com.sun:auto-snapshot=false \
|
||||
-o mountpoint=/tmp \
|
||||
${hostname,,}/tmp
|
||||
|
||||
if [[ "${encryption}" == 'yes' ]]; then
|
||||
zfs create \
|
||||
-o com.sun:auto-snapshot=false \
|
||||
-o mountpoint=/etc/zfs/keys \
|
||||
${hostname,,}/keystore
|
||||
fi
|
||||
|
||||
zpool set \
|
||||
bootfs=${hostname,,}/ROOT/${ID} \
|
||||
${hostname,,}
|
||||
|
||||
if [[ "${ID}" == 'fedora' ]]; then
|
||||
"${baseDir}/fedora.sh" --rsync
|
||||
fi
|
||||
|
||||
zfs create \
|
||||
${hostname,,}/var/mail
|
||||
|
||||
chmod \
|
||||
1777 \
|
||||
/mnt/tmp
|
||||
Executable
+102
@@ -0,0 +1,102 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
baseDir="$(realpath "$(dirname "${0}")/../")"
|
||||
|
||||
source \
|
||||
"${baseDir}/system.conf"
|
||||
|
||||
if [[ ! "${disk}" == **/dev/disk/by-id/** ]]; then
|
||||
if [[ "${disk}" == **/dev/nvme** ]]; then
|
||||
part3='p3'
|
||||
else
|
||||
part3='3'
|
||||
fi
|
||||
else
|
||||
part3='-part3'
|
||||
fi
|
||||
|
||||
|
||||
if [[ "${encryption}" == 'yes' ]]; then
|
||||
zpoolPassword='A'
|
||||
zpoolPasswordVerify='B'
|
||||
|
||||
printf \
|
||||
'\033[?47h\033[2J\033[H'
|
||||
|
||||
while [[ ! "${zpoolPassword}" == "${zpoolPasswordVerify}" ]] || [[ -z "${zpoolPassword}" ]] || [[ "${#zpoolPassword}" -lt '8' ]]; do
|
||||
printf \
|
||||
"Enter a password to encrypt your root pool (minimum 8 characters):\n"
|
||||
read \
|
||||
-r \
|
||||
-s \
|
||||
zpoolPassword
|
||||
|
||||
printf \
|
||||
"Verify the password to encrypt your root pool:\n"
|
||||
read \
|
||||
-r \
|
||||
-s \
|
||||
zpoolPasswordVerify
|
||||
|
||||
if [[ ! "${zpoolPassword}" == "${zpoolPasswordVerify}" ]]; then
|
||||
printf \
|
||||
"ERROR:\tPasswords do not match!\n\n"
|
||||
elif [[ -z "${zpoolPassword}" ]]; then
|
||||
printf \
|
||||
"ERROR:\tPassword is empty!\n\n"
|
||||
elif [[ "${#zpoolPassword}" -lt '8' ]]; then
|
||||
printf \
|
||||
"ERROR:\tPassword is too short!\n\n"
|
||||
fi
|
||||
done
|
||||
|
||||
printf \
|
||||
'\033[?47l'
|
||||
mkdir \
|
||||
-p \
|
||||
/etc/zfs/keys/
|
||||
|
||||
printf \
|
||||
"${zpoolPassword}\n" | tee /etc/zfs/keys/${hostname,,}.key &> /dev/null
|
||||
|
||||
chmod \
|
||||
000 \
|
||||
/etc/zfs/keys/${hostname,,}.key
|
||||
|
||||
zpool create \
|
||||
-o ashift=12 \
|
||||
-o autotrim=on \
|
||||
-o compatibility=openzfs-2.1-linux \
|
||||
-O encryption=on \
|
||||
-O keylocation=file:///etc/zfs/keys/${hostname,,}.key \
|
||||
-O keyformat=passphrase \
|
||||
-O acltype=posixacl \
|
||||
-O xattr=sa \
|
||||
-O dnodesize=auto \
|
||||
-O compression=zstd-3 \
|
||||
-O normalization=formD \
|
||||
-O relatime=on \
|
||||
-O canmount=off \
|
||||
-O mountpoint=/ \
|
||||
-R /mnt \
|
||||
${hostname,,} \
|
||||
${disk}${part3}
|
||||
else
|
||||
zpool create \
|
||||
-o ashift=12 \
|
||||
-o autotrim=on \
|
||||
-o compatibility=openzfs-2.1-linux \
|
||||
-O encryption=off \
|
||||
-O acltype=posixacl \
|
||||
-O xattr=sa \
|
||||
-O dnodesize=auto \
|
||||
-O compression=zstd-3 \
|
||||
-O normalization=formD \
|
||||
-O relatime=on \
|
||||
-O canmount=off \
|
||||
-O mountpoint=/ \
|
||||
-R /mnt \
|
||||
${hostname,,} \
|
||||
${disk}${part3}
|
||||
fi
|
||||
Executable
+32
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
baseDir="$(realpath "$(dirname "${0}")/../")"
|
||||
|
||||
source \
|
||||
"${baseDir}/system.conf"
|
||||
|
||||
|
||||
zfs create\
|
||||
${hostname,,}/home/${username}
|
||||
|
||||
zfs create\
|
||||
${hostname,,}/home/${username}/.config
|
||||
|
||||
zfs create\
|
||||
-o canmount=off\
|
||||
${hostname,,}/home/${username}/.var
|
||||
|
||||
zfs create\
|
||||
${hostname,,}/home/${username}/.var/app
|
||||
|
||||
zfs create\
|
||||
-o canmount=off\
|
||||
${hostname,,}/home/${username}/.local
|
||||
|
||||
zfs create\
|
||||
-o canmount=off\
|
||||
${hostname,,}/home/${username}/.local/share
|
||||
|
||||
zfs create\
|
||||
${hostname,,}/home/${username}/.local/share/flatpak
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
|
||||
zgenhostid \
|
||||
-f \
|
||||
0x00bab10c
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
baseDir="$(realpath "$(dirname "${0}")/../")"
|
||||
|
||||
source \
|
||||
"${baseDir}/system.conf"
|
||||
|
||||
|
||||
cp \
|
||||
/etc/zfs/keys/${hostname,,}.key \
|
||||
/mnt/etc/zfs/keys/
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
baseDir="$(realpath "$(dirname "${0}")/../")"
|
||||
|
||||
source \
|
||||
"${baseDir}/system.conf"
|
||||
|
||||
|
||||
zfs \
|
||||
set \
|
||||
org.zfsbootmenu:keysource=${hostname,,}/keystore \
|
||||
${hostname,,}
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
baseDir="$(realpath "$(dirname "${0}")/../")"
|
||||
|
||||
source \
|
||||
/etc/os-release
|
||||
source \
|
||||
"${baseDir}/system.conf"
|
||||
|
||||
|
||||
zfs \
|
||||
set \
|
||||
org.zfsbootmenu:commandline='quiet splash rhgb noresume' \
|
||||
${hostname,,}/ROOT/${ID}
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
baseDir="$(realpath "$(dirname "${0}")/../")"
|
||||
|
||||
source \
|
||||
"${baseDir}/system.conf"
|
||||
|
||||
|
||||
umount \
|
||||
-nR \
|
||||
/mnt
|
||||
|
||||
zpool \
|
||||
export \
|
||||
${hostname,,}
|
||||
Reference in New Issue
Block a user