From 3fc42c91bd1c1e030ddfb13267cd93adb75daab7 Mon Sep 17 00:00:00 2001 From: whoisYoges Date: Sat, 16 Jul 2022 18:55:09 +0545 Subject: [PATCH] Added installer as package + ly login manager + more --- base/Packages-Root | 1 + base/root-overlay/etc/issue | 54 +-- base/root-overlay/etc/issue.live | 54 +-- base/root-overlay/etc/pacman.conf | 4 +- base/root-overlay/etc/pacman.d/mirrorlist | 64 ++-- base/root-overlay/usr/local/bin/final.sh | 32 -- .../root-overlay/usr/local/bin/metis-sideload | 308 ------------------ base/root-overlay/usr/local/config/grub | 2 +- base/root-overlay/usr/local/config/os-release | 8 +- .../usr/local/config/post_install.sh | 285 ---------------- base/root-overlay/usr/local/config/xinitrc | 4 +- base/root-overlay/usr/local/config/zshrc | 6 +- 12 files changed, 112 insertions(+), 710 deletions(-) delete mode 100755 base/root-overlay/usr/local/bin/final.sh delete mode 100755 base/root-overlay/usr/local/bin/metis-sideload delete mode 100755 base/root-overlay/usr/local/config/post_install.sh mode change 100644 => 100755 base/root-overlay/usr/local/config/xinitrc diff --git a/base/Packages-Root b/base/Packages-Root index 3dc1aa3..c14541f 100644 --- a/base/Packages-Root +++ b/base/Packages-Root @@ -8,4 +8,5 @@ btrfs-progs e2fsprogs xfsprogs f2fs-tools +metis-sideload artix-live-@initsys@ \ No newline at end of file diff --git a/base/root-overlay/etc/issue b/base/root-overlay/etc/issue index d461ae5..a5aefd4 100644 --- a/base/root-overlay/etc/issue +++ b/base/root-overlay/etc/issue @@ -4,28 +4,38 @@ Metis Live ISO (\l) - \s-\r \m \e[0m# Welcome to Metis Linux # \e[34m - .... - . :::: . - .-::-.. - .----.. - . -- . - ... ... - .:::: ::::. - :::::::::::: - ::.::::::::::.:: - :::::::::::::::::: - :---::::::::::::---: - -----::: ::::.:::----- - .-------- .-- .-------- - .=-------: -- ---------. - :=--------: :: :---------. - :=------::.. ..::-------. - ----:. .:---. - -:. .:-:\e[0m +                                                       +                                                       +                        ..oo..                         +                      .  oxxd  .                       +                        ld00dl                         +                      . oxOOxo .                       +                         oooo.                         +                     ':   ''   :;                      +                    ,kOx.    .xOO;                     +                   ,kkkkk.  .kkkkk;                    +                  ,kOOOOOk  kOOOOOO;                   +                   oOOOOOOllOOOOOOo                    +                ;xc.OOOOOOOOOOOOOO.:x;                 +               :xxxd00000000000000dxxx;                +              :xxxxx000000OOO00000xxxxx:               +             cdddddk0Okxxxxxxxxkk0kddddd:              +            cddddddxxxl  xxxx. xxxxdddddd:             +           loooddddddo   cddc   ddddddddoo:            +          loodddddddd.   .dd.   ,ddddddddooc           +        .looddddddddd     dd     dddddddddooc          +       .loodddddddddd     cl     dddddddddddoc         +      'loooooooooo;                'ooooooooool        +     ,oooooo                             'oooool.      +    :oo;                                     .ooo.     +   c                                             o'    +                                                       +                                                       +\e[0m - Login Crdientials: + Login Credientials: - \e[34muser\e[0m \e[1m\e[36mroot\e[0m - \e[34mpassword\e[0m \e[1m\e[36mmetis\e[0m + \e[34musername\e[0m \e[1m\e[36mroot\e[0m + \e[34mpassword\e[0m \e[1m\e[36mmetis\e[0m - To launch the installer login and run: \e[1m\e[metis-sideload\e[0m + To launch the installer login and run: \e[1m\e[36mmetis-sideload\e[0m diff --git a/base/root-overlay/etc/issue.live b/base/root-overlay/etc/issue.live index 3a7077b..a5aefd4 100644 --- a/base/root-overlay/etc/issue.live +++ b/base/root-overlay/etc/issue.live @@ -4,28 +4,38 @@ Metis Live ISO (\l) - \s-\r \m \e[0m# Welcome to Metis Linux # \e[34m - .... - . :::: . - .-::-.. - .----.. - . -- . - ... ... - .:::: ::::. - :::::::::::: - ::.::::::::::.:: - :::::::::::::::::: - :---::::::::::::---: - -----::: ::::.:::----- - .-------- .-- .-------- - .=-------: -- ---------. - :=--------: :: :---------. - :=------::.. ..::-------. - ----:. .:---. - -:. .:-:\e[0m +                                                       +                                                       +                        ..oo..                         +                      .  oxxd  .                       +                        ld00dl                         +                      . oxOOxo .                       +                         oooo.                         +                     ':   ''   :;                      +                    ,kOx.    .xOO;                     +                   ,kkkkk.  .kkkkk;                    +                  ,kOOOOOk  kOOOOOO;                   +                   oOOOOOOllOOOOOOo                    +                ;xc.OOOOOOOOOOOOOO.:x;                 +               :xxxd00000000000000dxxx;                +              :xxxxx000000OOO00000xxxxx:               +             cdddddk0Okxxxxxxxxkk0kddddd:              +            cddddddxxxl  xxxx. xxxxdddddd:             +           loooddddddo   cddc   ddddddddoo:            +          loodddddddd.   .dd.   ,ddddddddooc           +        .looddddddddd     dd     dddddddddooc          +       .loodddddddddd     cl     dddddddddddoc         +      'loooooooooo;                'ooooooooool        +     ,oooooo                             'oooool.      +    :oo;                                     .ooo.     +   c                                             o'    +                                                       +                                                       +\e[0m - Login Crdientials: + Login Credientials: - \e[34muser\e[0m \e[1m\e[36mroot\e[0m - \e[34mpassword\e[0m \e[1m\e[36mmetis\e[0m + \e[34musername\e[0m \e[1m\e[36mroot\e[0m + \e[34mpassword\e[0m \e[1m\e[36mmetis\e[0m - To launch the installer login and run: \e[1m\e[36mmetis-sideload\e[0m + To launch the installer login and run: \e[1m\e[36mmetis-sideload\e[0m diff --git a/base/root-overlay/etc/pacman.conf b/base/root-overlay/etc/pacman.conf index a1ac824..5b8d083 100644 --- a/base/root-overlay/etc/pacman.conf +++ b/base/root-overlay/etc/pacman.conf @@ -15,14 +15,14 @@ #LogFile = /var/log/pacman.log #GPGDir = /etc/pacman.d/gnupg/ #HookDir = /etc/pacman.d/hooks/ -HoldPkg = pacman glibc +HoldPkg = pacman glibc #XferCommand = /usr/bin/curl -L -C - -f -o %o %u #XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u #CleanMethod = KeepInstalled Architecture = auto # Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup -IgnorePkg = audacity +#IgnorePkg = #IgnoreGroup = #NoUpgrade = diff --git a/base/root-overlay/etc/pacman.d/mirrorlist b/base/root-overlay/etc/pacman.d/mirrorlist index 8bc024a..b8deb4e 100644 --- a/base/root-overlay/etc/pacman.d/mirrorlist +++ b/base/root-overlay/etc/pacman.d/mirrorlist @@ -1,38 +1,40 @@ Server = https://mirrors.42tm.tech/artix-linux/$repo/os/$arch -Server = http://mirrors.redcorelinux.org/artixlinux/$repo/os/$arch -Server = https://mirror.freedif.org/Artix/$repo/os/$arch Server = https://mirror.funami.tech/artix/$repo/os/$arch Server = https://mirror.pascalpuffke.de/artix-linux/$repo/os/$arch -Server = https://mirror.clarkson.edu/artix-linux/repos/$repo/os/$arch -Server = https://mirror.linux.pizza/artix-linux/$repo/os/$arch -Server = https://ftp.halifax.rwth-aachen.de/artixlinux/$repo/os/$arch -Server = https://mirror1.artixlinux.org/repos/$repo/os/$arch -Server = https://eu-mirror.artixlinux.org/repos/$repo/os/$arch -Server = https://mirror.one.com/artix/$repo/os/$arch -Server = https://artix.unixpeople.org/repos/$repo/os/$arch -Server = https://artix.cccp.io/$repo/os/$arch -Server = https://mirrors.tuna.tsinghua.edu.cn/artixlinux/$repo/os/$arch -Server = https://mirrors.rit.edu/artixlinux/$repo/os/$arch -Server = https://mirrors.dotsrc.org/artix-linux/repos/$repo/os/$arch -Server = https://us-mirror.artixlinux.org/$repo/os/$arch -Server = https://mirrors.ocf.berkeley.edu/artix-linux/$repo/os/$arch -Server = https://mirrors.dotsrc.org/artix-linux/repos/$repo/os/$arch -Server = https://ftp.crifo.org/artix/repos/$repo/os/$arch -Server = https://ftp.cc.uoc.gr/mirrors/linux/artixlinux/$repo/os/$arch -Server = https://ftp.sh.cvut.cz/artix-linux/$repo/os/$arch -Server = http://www.nylxs.com/mirror/repos/$repo/os/$arch -Server = https://mirror1.cl.netactuate.com/artix/repos/$repo/os/$arch -Server = https://mirrors.aliyun.com/artixlinux/$repo/os/$arch -Server = https://mirror.csclub.uwaterloo.ca/artixlinux/$repo/os/$arch -Server = https://mirror.aarnet.edu.au/pub/artix/$repo/os/$arch -Server = https://quantum-mirror.hu/mirrors/pub/artix-linux/$repo/os/$arch Server = https://mirror.nju.edu.cn/artixlinux/$repo/os/$arch -Server = https://mirror.netcologne.de/artix-linux/$repo/os/$arch +Server = https://mirror.linux.pizza/artix-linux/$repo/os/$arch +Server = https://mirror.freedif.org/Artix/$repo/os/$arch +Server = https://eu-mirror.artixlinux.org/repos/$repo/os/$arch +Server = https://ftp.sh.cvut.cz/artix-linux/$repo/os/$arch Server = https://mirrors.cloud.tencent.com/artixlinux/$repo/os/$arch -Server = https://artixlinux.qontinuum.space/artixlinux/$repo/os/$arch -Server = https://ftp.ludd.ltu.se/mirrors/artix/$repo/os/$arch -Server = http://ftp.ntua.gr/pub/linux/artix-linux/$repo/os/$arch -Server = https://artix.wheaton.edu/repos/$repo/os/$arch -Server = https://ftp.uni-bayreuth.de/linux/artix-linux/$repo/os/$arch +Server = https://mirror.one.com/artix/$repo/os/$arch +Server = https://mirrors.tuna.tsinghua.edu.cn/artixlinux/$repo/os/$arch +Server = https://mirror1.artixlinux.org/repos/$repo/os/$arch +Server = http://www.nylxs.com/mirror/repos/$repo/os/$arch +Server = http://mirrors.redcorelinux.org/artixlinux/$repo/os/$arch +Server = https://mirrors.aliyun.com/artixlinux/$repo/os/$arch Server = https://mirror.clarkson.edu/artix-linux/repos/$repo/os/$arch +Server = https://artix.cccp.io/$repo/os/$arch +Server = https://mirror.clarkson.edu/artix-linux/repos/$repo/os/$arch +Server = https://artixlinux.qontinuum.space/artixlinux/$repo/os/$arch +Server = https://ftp.crifo.org/artix/repos/$repo/os/$arch +Server = https://mirror.netcologne.de/artix-linux/$repo/os/$arch +Server = https://ftp.halifax.rwth-aachen.de/artixlinux/$repo/os/$arch +Server = http://artist.artixlinux.org/repos/$repo/os/$arch +Server = https://us-mirror.artixlinux.org/$repo/os/$arch +Server = https://mirrors.dotsrc.org/artix-linux/repos/$repo/os/$arch +Server = https://mirror.csclub.uwaterloo.ca/artixlinux/$repo/os/$arch +Server = http://ftp.ntua.gr/pub/linux/artix-linux/$repo/os/$arch +Server = https://artix.unixpeople.org/repos/$repo/os/$arch +Server = https://mirrors.rit.edu/artixlinux/$repo/os/$arch +Server = https://artix.wheaton.edu/repos/$repo/os/$arch +Server = https://mirror1.cl.netactuate.com/artix/repos/$repo/os/$arch +Server = https://mirrors.ocf.berkeley.edu/artix-linux/$repo/os/$arch +Server = https://ftp.cc.uoc.gr/mirrors/linux/artixlinux/$repo/os/$arch +Server = https://mirror.aarnet.edu.au/pub/artix/$repo/os/$arch +Server = https://ftp.ludd.ltu.se/mirrors/artix/$repo/os/$arch +Server = https://mirrors.dotsrc.org/artix-linux/repos/$repo/os/$arch +Server = http://ftp.ntua.gr/pub/linux/artix-linux/$repo/os/$arch +Server = https://quantum-mirror.hu/mirrors/pub/artix-linux/$repo/os/$arch +Server = https://ftp.uni-bayreuth.de/linux/artix-linux/$repo/os/$arch Server = https://mirrors.nettek.us/artix-linux/$repo/os/$arch diff --git a/base/root-overlay/usr/local/bin/final.sh b/base/root-overlay/usr/local/bin/final.sh deleted file mode 100755 index 2f92a9b..0000000 --- a/base/root-overlay/usr/local/bin/final.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash - -rm -rf /mnt/post_install.sh -sleep 1s -clear -echo -ne " -__________________________________________________________________________________________________________ -| Thanks For Choosing Metis Linux! | -| | -| +-+-+-+-+-+ +-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+ | -| |M|a|g|i|c| |M|e|t|i|s| |I|n|s|t|a|l|l|e|r| | -| +-+-+-+-+-+ +-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+ | -| | -|---------------------------------------------------------------------------------------------------------| -| INSTALLATION SUCCESSFUL! | -|---------------------------------------------------------------------------------------------------------| -| Metis Linus Installation Completed. | -| Check: https://github.com/metis-os for details or visit https://metislinux.org | -|---------------------------------------------------------------------------------------------------------| -|_________________________________________________________________________________________________________| - -" -echo "Metis Linux Installation Finished!!!" -echo "Umounting all the drives" -umount -R /mnt -echo "After Reboot login your your username and password and type startx to start GUI." -echo "If you've installed metis-os in a VM, it may be buggy or could perform abnormal, try disabling picom compositor." -echo "AFTER REBOOTING RUN THE FOLLOWING COMMAND IN CASE OF NO NETWORK CONNECTIO: " -echo "1. sudo ls -s /etc/runit/sv/NetworkManager /run/runit/service" -echo "And then rebooting in 15 seconds!!!" -sleep 20s -reboot diff --git a/base/root-overlay/usr/local/bin/metis-sideload b/base/root-overlay/usr/local/bin/metis-sideload deleted file mode 100755 index 386b54c..0000000 --- a/base/root-overlay/usr/local/bin/metis-sideload +++ /dev/null @@ -1,308 +0,0 @@ -#!/usr/bin/env bash - -networkError() { - sleep 2s - clear - echo -e "Couldnot connect to the internet.\nCheck your Internet Connection and please try again.\nExitting..." - sleep 2s - exit 1 -} - -failed() { - sleep 2s - clear - echo -e "Something went wrong.\nThe command could not be executed correctly!\nPlease try again.\nExitting..." - sleep 2s - exit 1 -} - -installationError() { - sleep 2s - clear - echo -e "Something went wrong.\nAll the packages couldn't be installed correctly!\nPlease try again.\nExitting..." - sleep 2s - exit 1 -} - -configError() { - sleep 2s - clear - echo "Checking configs in new system..." - if ! ls /mnt/config &> /dev/null; then - echo -e "Reuired config files couldn't be copied to new system. Installation failed!\nAborting..." - exit 1 - else - ls /mnt/config - echo "All good..." - sleep 5s - fi -} - -ignoreableErrors() { - sleep 2s - clear - echo -e "Something went wrong.\nThe command was not executed correctly!\nThe error can be negleted as it doesn't affect our installation.\nContinuing the installation..." - sleep 3s -} - -updateMirrors() { - sleep 2s - clear - if ! which rankmirrors &> /dev/null; then - echo -e "rankmirrors command not found\nCouldn't update the repository mirrorlists\nContinuing without updating mirrors have got chances of installation failure..." - else - echo -e "\nUpdating latest and fastest mirrorlists to download packages faster.\nBe patient, this may take some time upto few minutes..." - rankmirrors -n 20 /etc/pacman.d/mirrorlist > /etc/pacman.d/mirrorlist.new - mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak || ignoreableErrors - mv /etc/pacman.d/mirrorlist.new /etc/pacman.d/mirrorlist || failed - echo "Mirrorlists updated..." - sleep 2s - fi -} - -checkingConnection() { - sleep 2s - clear - echo "Checking internet connection..." - ping -c 3 metislinux.org || networkError - echo "Cool! Internet Connection Available. Getting ready for installation..." - sleep 3s -} - -settingFont() { - sleep 2s - clear - echo "Setting bigger font for better readability..." - sleep 2s - setfont ter-v22b || ignoreableErrors -} - -displayArt(){ - sleep 2s - clear - echo -ne " - __________________________________________________________________________________________________________ - | | - | +-+-+-+-+-+ +-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+ | - | |M|a|g|i|c| |M|e|t|i|s| |I|n|s|t|a|l|l|e|r| | - | +-+-+-+-+-+ +-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+ | - | | - |---------------------------------------------------------------------------------------------------------| - | Official Cli installer for metis linux. | - |---------------------------------------------------------------------------------------------------------| - | Install Metis Linus in few clicks | - | Check: https://github.com/metis-os for details or visit https://metislinux.org | - |---------------------------------------------------------------------------------------------------------| - |_________________________________________________________________________________________________________| - " -} - -checkDrive(){ - if ! lsblk | grep "$drive" &> /dev/null ; then - clear - echo -e "$drive is not found. Check your available disks and try again.\nAborting installation\nInstallation failed..." - exit 1 - fi -} - -diskPartition(){ - sleep 2s - clear - echo -ne " - ------------------------------------------------------------------------ - THIS WILL FORMAT AND DELETE ALL DATA ON THE DISK - Please make sure you know what you are doing because - after formating your disk there is no way to get data back - ------------------------------------------------------------------------ - " - lsblk - echo "Enter the drive to install metis linux on it." - echo "Enter Drive (eg. sda or vda or nvme0n1): " - read -r drive - checkDrive - sleep 2s - clear - lsblk - echo "Choose a familier disk utility tool to partition your drive! [Default=cfdisk]: " - echo " 1. fdisk" - echo " 2. cfdisk" - echo " 3. gdisk" - echo " 4. parted" - read -r partitionutility - - case "$partitionutility" in - 1 | fdisk | Fdisk | FDISK) - partitionutility="fdisk" - ;; - 2 | cfdisk | Cfdisk | CFDISK) - partitionutility="cfdisk" - ;; - 3 | gdisk | Gdisk | GDISK) - partitionutility="gdisk" - ;; - 4 | parted | Parted | PARTED) - partitionutility="parted" - ;; - *) - echo "Unknown or unsupported disk utility! Default = cfdisk." - partitionutility="cfdisk" - ;; - esac - echo "$partitionutility is the selected disk utility tool for partition." - echo "Getting ready for creating partitions!" - sleep 2s - clear - echo "boot partition is mandatory for uefi systems. Skip it for legacy systems" - echo "root partition is mandatory." - echo "home and swap partitions are optional but recommended!" - echo "Also, you can create a separate partition for timeshift backup (optional)!" - echo "Getting ready in 15 seconds" - sleep 15s - "$partitionutility" /dev/"$drive" - clear - lsblk - echo " 1. ext4" - echo " 2. xfs" - echo " 3. btrfs" - echo " 4. f2fs" - echo " Boot partition will be formatted later in fat32 file system (for uefi systems only)." - echo "Choose your linux file system type for formatting drives [default=ext4]: " - read -r filesystemtype - - case "$filesystemtype" in - 1 | ext4 | Ext4 | EXT4) - filesystemtype="ext4" - ;; - 2 | xfs | Xfs | XFS) - filesystemtype="xfs" - ;; - 3 | btrfs | Btrfs | BTRFS) - filesystemtype="btrfs" - ;; - 4 | f2fs | F2fs | F2FS) - filesystemtype="f2fs" - ;; - *) - echo "Unknown or unsupported Filesystem. Default = ext4." - filesystemtype="ext4" - ;; - esac - echo "$filesystemtype is the selected file system type." - echo "Getting ready for formatting drives." - sleep 3s - clear - lsblk - echo "Enter the root partition (eg: sda1 or nvme0n1p2 or vda4): " - read -r rootpartition - mkfs."$filesystemtype" /dev/"$rootpartition" - mount /dev/"$rootpartition" /mnt - if mountpoint /mnt = "/mnt is not a mountpoint"; then - clear - echo -e "$rootpartition is not mounted successfully. Aborting installation!\nInstallation failed..." - exit 1 - else - echo "Cool $rootpartition mounted at /mnt" - sleep 2s - fi - - clear - lsblk - echo "Did you also create separate home partition? [y/n]: " - read -r answerhome - case "$answerhome" in - y | Y | yes | Yes | YES) - echo "Enter home partition (eg: sda2 or nvme0n1p1 or vda2): " - read -r homepartition - mkfs."$filesystemtype" /dev/"$homepartition" - mkdir /mnt/home - mount /dev/"$homepartition" /mnt/home - if mountpoint /mnt/home = "/mnt/home is not a mountpoint"; then - clear - echo -e "$homepartition is not mounted successfully. Aborting installation!\nInstallation failed..." - exit 1 - else - echo "Cool $homepartition mounted at /mnt/home" - sleep 2s - fi - ;; - *) - echo "Skipping home partition!" - ;; - esac - clear - lsblk - echo "Did you also create swap partition? [y/n]: " - read -r answerswap - case "$answerswap" in - y | Y | yes | Yes | YES) - echo "Enter swap partition (eg: sda3, nvme0n1p1or vda3): " - read -r swappartition - mkswap /dev/"$swappartition" - swapon /dev/"$swappartition" - ;; - *) - echo "Skipping Swap partition!" - ;; - esac - lsblk - sleep 2s -} - -installingBase() { - sleep 2s - clear - echo "Installing Base system..." - basestrap /mnt base base-devel runit elogind-runit || installationError - sleep 2s -} - -installingKernel() { - sleep 2s - clear - echo "Installing Zen Kernel with its headers and firmware..." - basestrap /mnt linux-zen linux-firmware linux-zen-headers || installationError - sleep 2s -} - -generatingFstab() { - sleep 2s - clear - echo "generating fstab file" - fstabgen -U /mnt > /mnt/etc/fstab || failed - echo "Checking Fstab Contents..." - cat /mnt/etc/fstab - sleep 3s -} - -copyingConfig() { - sleep 2s - clear - echo "Copying config files to new system..." - cp /etc/pacman.d/mirrorlist /mnt/etc/pacman.d/mirrorlist || ignoreableErrors - cp /etc/pacman.d/metis-mirrorlist /mnt/etc/pacman.d/metis-mirrorlist || failed - cp /etc/pacman.conf /mnt/etc/pacman.conf || failed - mv /usr/local/config/post_install.sh /mnt/ || failed - cp -r /usr/local/config /mnt - configError -} - -firstphaseCompleted(){ - sleep 2s - clear - echo "First Phase Completed!" - echo "Entering into Second Phase of Installation..." - echo "Run the following commands to start second phase..." - echo "1. metis-chroot /mnt" - echo "2. ./post_install.sh" -} - -displayArt -settingFont -checkingConnection -updateMirrors -diskPartition -installingBase -installingKernel -generatingFstab -copyingConfig -firstphaseCompleted diff --git a/base/root-overlay/usr/local/config/grub b/base/root-overlay/usr/local/config/grub index 5b17c9c..fba713c 100644 --- a/base/root-overlay/usr/local/config/grub +++ b/base/root-overlay/usr/local/config/grub @@ -1,7 +1,7 @@ # GRUB boot loader configuration GRUB_DEFAULT=0 -GRUB_TIMEOUT=5 +GRUB_TIMEOUT=0 GRUB_DISTRIBUTOR="Metis" GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet console=tty2" GRUB_CMDLINE_LINUX="" diff --git a/base/root-overlay/usr/local/config/os-release b/base/root-overlay/usr/local/config/os-release index 878c058..281805c 100644 --- a/base/root-overlay/usr/local/config/os-release +++ b/base/root-overlay/usr/local/config/os-release @@ -3,8 +3,8 @@ PRETTY_NAME="Metis Linux" ID=metis BUILD_ID=rolling ANSI_COLOR="0;37" -HOME_URL="https://metislinux.org/" -DOCUMENTATION_URL="https://wiki.metislinux.org/" -SUPPORT_URL="https://metislinux.org/" +HOME_URL="https://metislinux.org" +DOCUMENTATION_URL="https://metislinux.org/wiki/" +SUPPORT_URL="https://t.me/metislinux" BUG_REPORT_URL="https://github.com/metis-os/" -LOGO=metislinux \ No newline at end of file +LOGO=metislinux diff --git a/base/root-overlay/usr/local/config/post_install.sh b/base/root-overlay/usr/local/config/post_install.sh deleted file mode 100755 index 9215ae1..0000000 --- a/base/root-overlay/usr/local/config/post_install.sh +++ /dev/null @@ -1,285 +0,0 @@ -#!/usr/bin/env bash - -failed() { - sleep 2s - clear - echo -e "Something went wrong.\nThe command could not be executed correctly!\nPlease try again.\nExitting..." - sleep 2s - exit 1 -} - -installationError() { - sleep 2s - clear - echo -e "Something went wrong.\nAll the packages couldn't be installed correctly!\nPlease try again.\nExitting..." - sleep 2s - exit 1 -} - -ignoreableErrors() { - sleep 2s - clear - echo -e "Something went wrong.\nOS is installing and could be useable but the error should be manually fixed later..." - sleep 3s -} - -displayArt(){ - sleep 1s - clear - echo -ne " - Installing Metis Linux in a VM is not recommended as it may perform slow and buggy. - __________________________________________________________________________________________________________ - | | - | +-+-+-+-+-+ +-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+ | - | |M|a|g|i|c| |M|e|t|i|s| |I|n|s|t|a|l|l|e|r| | - | +-+-+-+-+-+ +-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+ | - | | - |---------------------------------------------------------------------------------------------------------| - | PHASE 2 | - |---------------------------------------------------------------------------------------------------------| - | Install Metis Linus in few clicks | - | Check: https://github.com/metis-os for details or visit https://metislinux.org | - |---------------------------------------------------------------------------------------------------------| - |_________________________________________________________________________________________________________| - " - sleep 4s -} - -generatingLocale() { - sleep 2s - clear - echo "Generating locale at /etc/locale.gen" - echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen || ignoreableErrors - locale-gen -} - -timezone() { - echo "Getting Timezone..." - time_zone="$(curl --fail https://ipapi.co/timezone)" - clear - echo "System detected your timezone to be $time_zone" - echo "Is this correct?" - - PS3="Select one.[1/2]: " - options=("Yes" "No") - select one in "${options[@]}"; do - case $one in - Yes) - echo "${time_zone} set as timezone" - ln -sf /usr/share/zoneinfo/"$time_zone" /etc/localtime && break - ;; - No) - echo "Please enter your desired timezone e.g. Europe/London :" - read -r new_timezone - echo "${new_timezone} set as timezone" - ln -sf /usr/share/zoneinfo/"$time_zone" /etc/localtime && break - ;; - *) echo "Wrong option. Try again";timezone;; - esac - done -} - -settingTimezone() { - sleep 2s - clear - timezone - hwclock --systohc - echo "Checking system date and time..." - date - sleep 2s -} - -settingLang() { - sleep 2s - clear - echo "Setting LANG variable" - echo "LANG=en_US.UTF-8" >> /etc/locale.conf - echo "LC_COLLATE=C" >> /etc/locale.conf - echo "Checking system language..." - cat /etc/locale.conf || ignoreableErrors - sleep 3s -} - -settingKeyboard() { - sleep 2s - clear - echo "Setting console keyboard layout" - echo "KEYMAP=us" > /etc/vconsole.conf - echo "Checking system Keyboard Layout..." - cat /etc/locale.conf || ignoreableErrors - sleep 3s -} - -settingHostname() { - sleep 2s - clear - echo "Enter your computer name: " - read -r hostname - echo "$hostname" > /etc/hostname - echo "Checking hostname (/etc/hostname)" - cat /etc/hostname || ignoreableErrors - sleep 3s -} - -settingHosts() { - sleep 2s - clear - echo "setting up hosts file" - { - echo "127.0.0.1 localhost" - echo "::1 localhost" - echo "127.0.1.1 $hostname.localdomain $hostname" - } >> /etc/hosts - - echo "checking /etc/hosts file" - cat /etc/hosts || ignoreableErrors - sleep 3s -} - -installingBootloader() { - clear - #if you are dualbooting, add os-prober with grub and efibootmgr - echo "Installing grub networkmanager and zsh shell..." - pacman -Sy --needed --noconfirm grub networkmanager-runit zsh || installationError - sleep 3s -} - -enablingServices() { - sleep 2s - clear - echo "Enabling NetworkManager" - ln -s /etc/runit/sv/NetworkManager /etc/runit/runsvdir/default - clear -} - -addingUser() { - clear - echo "Enter password for root user!" - passwd - sleep 1s - clear - echo "Adding regular user!" - echo "Enter username to add a regular user: " - read -r username - useradd -m -g users -G wheel,audio,video,network,storage -s /bin/zsh "$username" || ignoreableErrors - echo "To set password for $username, use different password than of root." - echo "Enter password for $username! " - passwd "$username" - echo "NOTE: ALWAYS REMEMBER THIS USERNAME AND PASSWORD YOU PUT JUST NOW." - sleep 3s -} - -sudoAccess() { - sleep 2s - clear - echo "Giving sudo access to $username!" - echo "$username ALL=(ALL) ALL" >> /etc/sudoers.d/"$username" -} - -copyingConfig() { - sleep 2s - clear - echo "Copying config file to their absolute path..." - mv /config/os-release /usr/lib/ || failed - mv /config/grub /etc/default/grub || failed - - mv /config/xinitrc /home/"$username"/.xinitrc || failed - chown "$username":users /home/"$username"/.xinitrc || failed - mv /config/zshrc /home/"$username"/.zshrc || failed - chown "$username":users /home/"$username"/.zshrc || failed - - sleep 1s - mv /config /home/"$username"/.config/ || ignoreableErrors - chown -R "$username":users /home/"$username"/.config || ignoreableErrors - sleep 1s -} - -installingPackages() { - sleep 2s - clear - echo "Installing require packages for metis-os" - pacman -Sy --needed --noconfirm metis-dwm metis-st metis-dmenu metis-wallpapers xorg-server xorg-xinit xorg-xsetroot nerd-fonts-jetbrains-mono ttf-font-awesome pavucontrol pulseaudio pulseaudio-alsa firefox brillo linux-zen-headers linux-firmware curl git neovim zsh metis-slstatus picom-jonaburg-git acpi xwallpaper || installationError -} - -installingMicrocode() { - sleep 2s - clear - if lscpu | grep "GenuineIntel"; then - echo "Installing Intel microcode" - pacman -S --noconfirm --needed intel-ucode || ignoreableErrors - elif lscpu | grep "AuthenticAMD"; then - echo "Installing AMD microcode" - pacman -S --noconfirm --needed amd-ucode || ignoreableErrors - fi -} - -configuringBootloader() { - sleep 2s - clear - if [[ ! -d "/sys/firmware/efi" ]]; then - echo "Legacy system detected..." - echo "Enter the drive name to install bootloader in it. (eg: sda or nvme01 or vda or something similar)! " - echo "NOTE: JUST GIVE DRIVE NAME (sda, nvme0n1, vda or something similar); NOT THE PARTITION NAME (sda1)" - echo "Enter the drive name: " - read -r grubdrive - grub-install --target=i386-pc /dev/"$grubdrive" - grub-mkconfig -o /boot/grub/grub.cfg - else - echo "UEFI system detected..." - echo "Installing efibootmgr" - pacman -Sy --needed --noconfirm efibootmgr dosfstools - sleep 2s - clear - lsblk - echo "Enter partition to install grub! (eg: sda2 or nvme0n1p3, vda4 or something similar): " - read -r grubpartition - mkfs.fat -F 32 /dev/"$grubpartition" - mkdir -p /boot/efi - mount /dev/"$grubpartition" /boot/efi - grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB --removable - grub-mkconfig -o /boot/grub/grub.cfg - fi - sleep 2s -} - -graphicsDriver() { - sleep 2s - clear - echo "Searching and Installing graphics driver if available" - if lspci | grep "NVIDIA|GeForce"; then - pacman -S --noconfirm --needed nvidia nvidia-utils || ignoreableErrors - elif lspci | grep 'VGA' | grep -E "Radeon|AMD"; then - pacman -S --noconfirm --needed xf86-video-amdgpu || ignoreableErrors - elif lspci | grep "Integrated Graphics Controller"; then - pacman -S --noconfirm --needed libva-intel-driver libvdpau-va-gl vulkan-intel libva-utils || ignoreableErrors - elif lspci | grep -E "Intel Corporation UHD|Intel Corporation HD"; then - pacman -S --needed --noconfirm libva-intel-driver libvdpau-va-gl vulkan-intel libva-intel-driver libva-utils || ignoreableErrors - fi -} - -secondphaseCompleted(){ - sleep 2s - clear - echo "Second Phase Completed!" - echo "Entering into Final Phase of Installation..." - echo "Run the following commands to start final phase..." - echo "1. exit" - echo "2. final.sh" -} - -displayArt -generatingLocale -settingTimezone -settingLang -settingKeyboard -settingHostname -settingHosts -installingBootloader -addingUser -sudoAccess -copyingConfig -installingPackages -installingMicrocode -configuringBootloader -graphicsDriver -secondphaseCompleted diff --git a/base/root-overlay/usr/local/config/xinitrc b/base/root-overlay/usr/local/config/xinitrc old mode 100644 new mode 100755 index 8d67b79..e4f6efa --- a/base/root-overlay/usr/local/config/xinitrc +++ b/base/root-overlay/usr/local/config/xinitrc @@ -1,6 +1,8 @@ +#!/usr/bin/sh + slstatus & picom & xwallpaper --zoom /usr/share/backgrounds/metis/b-01-dark.png & while true; do dwm >/dev/null 2>&1 -done \ No newline at end of file +done diff --git a/base/root-overlay/usr/local/config/zshrc b/base/root-overlay/usr/local/config/zshrc index acfcdaf..c69fc05 100644 --- a/base/root-overlay/usr/local/config/zshrc +++ b/base/root-overlay/usr/local/config/zshrc @@ -11,7 +11,7 @@ export IP="2334242343" # History in cache directory: HISTSIZE=10000000 SAVEHIST=10000000 -HISTFILE=~/.cache/zsh/history +HISTFILE=~/history export PATH=$PATH:/$HOME/.local/bin # Load aliases and shortcuts if existent. [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc" @@ -62,8 +62,10 @@ lfcd () { [ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir" fi } -bindkey -s '^o' 'lfcd\n' +#ALIAS +alias vim="nvim" +bindkey -s '^o' 'lfcd\n' bindkey -s '^f' 'cd "$(dirname "$(fzf)")"\n'