From b343cf397015cc6bd1460741a0c4010467d93d72 Mon Sep 17 00:00:00 2001 From: Tommaso Chiti Date: Mon, 1 Feb 2021 12:26:06 +0100 Subject: [PATCH] Snapper configuration. --- easy-arch.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/easy-arch.sh b/easy-arch.sh index 3e81829..8f90739 100644 --- a/easy-arch.sh +++ b/easy-arch.sh @@ -91,11 +91,11 @@ echo $hostname > /mnt/etc/hostname # Setting up locales. read -r -p "Please insert the locale you use in this format (xx_XX): " locale echo "$locale.UTF-8 UTF-8" > /mnt/etc/locale.gen -echo "LANG=\"$locale\"" > /mnt/etc/locale.conf +echo "LANG=\"$locale\".UTF-8" > /mnt/etc/locale.conf # Setting up keyboard layout. read -r -p "Please insert the keyboard layout you use: " kblayout -echo "KEYMAP=\"$kblayout\"" > /mnt/etc/vconsole.conf +echo "KEYMAP=\$kblayout\"" > /mnt/etc/vconsole.conf # Setting hosts file. echo "Setting hosts file." @@ -154,6 +154,11 @@ arch-chroot /mnt /bin/bash -e <<"EOF" echo "Creating a new initramfs." mkinitcpio -P &>/dev/null + # Snapper configuration + umount /.snapshots + rm -r /.snapshots + snapper -c root create-config / + # Installing GRUB. echo "Installing GRUB on /boot." grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB &>/dev/null @@ -176,6 +181,11 @@ systemctl enable fstrim.timer --root=/mnt &>/dev/null echo "Enabling NetworkManager." systemctl enable NetworkManager --root=/mnt &>/dev/null +# Enabling Snapper. +echo "Enabling Snapper." +systemctl enable snapper-timeline.timer --root=/mnt &>/dev/null +systemctl enable snapper-cleanup.timer --root=/mnt &>/dev/null + # Unmounting partitions. echo "Unmounting /mnt." umount -R /mnt