Merge branch 'main' into password

This commit is contained in:
Chris Titus 2022-07-30 10:06:16 -05:00 committed by GitHub
commit 6fe316f446
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 461 additions and 14 deletions

7
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,7 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

23
.github/labeler.yml vendored Normal file
View File

@ -0,0 +1,23 @@
repo:
- '*'
GitHub-Action:
- .github/workflows/*
Configs:
- configs/**/*
Package-Files:
- pkg-files/**/*
scripts:
- scripts/**/*
debug:
- scripts/debug/**/*
helpers:
- scripts/helpers/**/*
installers:
- scripts/installers/**/*

18
.github/workflows/combine.yml vendored Normal file
View File

@ -0,0 +1,18 @@
name: "Combine Dependabot PRs"
on:
workflow_dispatch:
jobs:
combine-prs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.0.2
- uses: maadhattah/combine-dependabot-prs@main
with:
branchPrefix: "dependabot"
mustBeGreen: true
combineBranchName: "combined-prs"
ignoreLabel: "nocombine"
baseBranch: "main"
openPR: true
allowSkipped: false

View File

@ -0,0 +1,27 @@
name: Generate Documentation
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3.0.2
- name: Github Action genshdoc
id: action-genshdoc
uses: vargiuscuola/genshdoc@master
- name: genshdoc result
run: echo "The result of genshdoc Action was ${{ steps.action-genshdoc.outputs.result }}"
- name: Commit files
run: |
echo ${{ github.ref }}
git add .
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "CI: Automated build push" -a | exit 0
- name: Push changes
if: github.ref == 'refs/heads/main'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

22
.github/workflows/label.yml vendored Normal file
View File

@ -0,0 +1,22 @@
# This workflow will triage pull requests and apply a label based on the
# paths that are modified in the pull request.
#
# To use this workflow, you will need to set up a .github/labeler.yml
# file with configuration. For more information, see:
# https://github.com/actions/labeler
name: Labeler
on: [pull_request]
jobs:
label:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

55
.github/workflows/linter.yml vendored Normal file
View File

@ -0,0 +1,55 @@
---
#################################
#################################
## Super Linter GitHub Actions ##
#################################
#################################
name: Lint Code Base
#
# Documentation:
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
#
#############################
# Start the job on all push #
#############################
on:
push:
branches-ignore: [master, main]
# Remove the line above to run when pushing to master
pull_request:
branches: [master, main]
###############
# Set the Job #
###############
jobs:
build:
# Name the Job
name: Lint Code Base
# Set the agent to run on
runs-on: ubuntu-latest
##################
# Load all steps #
##################
steps:
##########################
# Checkout the code base #
##########################
- name: Checkout Code
uses: actions/checkout@v3.0.2
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0
################################
# Run Linter against code base #
################################
- name: Lint Code Base
uses: github/super-linter@v4
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

4
.gitignore vendored
View File

@ -1,4 +1,6 @@
install.conf
installlog.txt
archnikus.code-workspace
setup.conf
configs/setup.conf
# keep logs out
configs/*.log

6
CODEOWNERS Normal file
View File

@ -0,0 +1,6 @@
# Lines starting with '#' are comments.
# Each line is a file pattern followed by one or more owners.
# Order is important. The last matching pattern has the most precedence.
# These owners will be the default owners for everything in the repo.
* @ChrisTitusTech

View File

@ -1,4 +1,5 @@
# ArchTitus Installer Script
[![GitHub Super-Linter](https://github.com/ChrisTitusTech/ArchTitus/workflows/Lint%20Code%20Base/badge.svg)](https://github.com/marketplace/actions/super-linter)
<img src="https://i.imgur.com/YiNMnan.png" />
@ -23,12 +24,15 @@ cd ArchTitus
```
### System Description
This is completely automated arch install of the KDE desktop environment on arch using all the packages I use on a daily basis.
This is completely automated arch install. It includes prompts to select your desired desktop environment, window manager, AUR helper, and whether to do a full or minimal install. The KDE desktop environment on arch includes all the packages I use on a daily basis, as well as some customizations.
## Troubleshooting
__[Arch Linux Installation Guide](https://github.com/rickellis/Arch-Linux-Install-Guide)__
__[Arch Linux RickEllis Installation Guide](https://github.com/rickellis/Arch-Linux-Install-Guide)__
__[Arch Linux Wiki Installation Guide](https://wiki.archlinux.org/title/Installation_guide)__
The main script will generate .log files for every script that is run as part of the installation process. These log files contain the terminal output so you can review any warnings or errors that occurred during installation and aid in troubleshooting.
### No Wifi
You can check if the WiFi is blocked by running `rfkill list`.
@ -46,6 +50,14 @@ After unblocking the WiFi, you can connect to it. Go through these 5 steps:
#5: Find your network, and run `station [device name] connect [network name]`, enter your password and run `exit`. You can test if you have internet connection by running `ping google.com`, and then Press Ctrl and C to stop the ping test.
## Reporting Issues
An issue is easier to resolve if it contains a few important pieces of information.
1. Chosen configuration from /configs/setup.conf (DONT INCLUDE PASSWORDS)
1. Errors seen in .log files
1. What commit/branch you used
1. Where you were installing (VMWare, Virtualbox, Virt-Manager, Baremetal, etc)
1. If a VM, what was the configuration used.
## Credits
- Original packages script was a post install cleanup script called ArchMatic located here: https://github.com/rickellis/ArchMatic

23
REFERENCE-0-preinstall.md Normal file
View File

@ -0,0 +1,23 @@
# Preinstall
Contains the steps necessary to configure and pacstrap the install to selected drive.
# Overview
Creates the btrfs subvolumes.
# Functions
* [mountallsubvol()](#mountallsubvol)
* [subvolumesetup()](#subvolumesetup)
## mountallsubvol()
Mount all btrfs subvolumes after root has been mounted.
## subvolumesetup()
BTRFS subvolulme creation and mounting.

8
REFERENCE-1-setup.md Normal file
View File

@ -0,0 +1,8 @@
# Setup
Configures installed system, installs base packages, and creates user.
# Functions

8
REFERENCE-2-user.md Normal file
View File

@ -0,0 +1,8 @@
# User
User customizations and AUR package installation.
# Functions

View File

@ -0,0 +1,8 @@
# Post-Setup
Finalizing installation configurations and cleaning up after script.
# Functions

8
REFERENCE-archtitus.md Normal file
View File

@ -0,0 +1,8 @@
# ArchTitus
Entrance script that launches children scripts for each phase of installation.
# Functions

88
REFERENCE-startup.md Normal file
View File

@ -0,0 +1,88 @@
# Startup
This script will ask users about their prefrences like disk, file system, timezone, keyboard layout, user name, password, etc.
# Settings
## General Settings
* **CONFIG_FILE** (string)[default: **$CONFIGS_DIR/setup.conf**]: Location of setup.conf to be used by set_option and all subsequent scripts.
# Functions
* [set_option()](#set_option)
* [logo()](#logo)
* [filesystem()](#filesystem)
* [timezone()](#timezone)
* [keymap()](#keymap)
* [drivessd()](#drivessd)
* [diskpart()](#diskpart)
* [userinfo()](#userinfo)
* [aurhelper()](#aurhelper)
* [desktopenv()](#desktopenv)
* [installtype()](#installtype)
## set_option()
set options in setup.conf
### Output on stdout
* Output routed to startup.log
### Output on stderr
* # @stderror Output routed to startup.log
### Arguments
* **$1** (string): Configuration variable.
### Arguments
* **$2** (string): Configuration value.
## logo()
Displays ArchTitus logo
_Function has no arguments._
## filesystem()
This function will handle file systems. At this movement we are handling only
btrfs and ext4. Others will be added in future.
## timezone()
Detects and sets timezone.
## keymap()
Set user's keyboard mapping.
## drivessd()
Choose whether drive is SSD or not.
## diskpart()
Disk selection for drive to be used with installation.
## userinfo()
Gather username and password to be used for installation.
## aurhelper()
Choose AUR helper.
## desktopenv()
Choose Desktop Environment
## installtype()
Choose whether to do full or minimal installation.

8
REFERENCE.md Normal file
View File

@ -0,0 +1,8 @@
# Reference
**Library Files**
* [scripts/startup.sh](REFERENCE-startup.md)
* [scripts/0-preinstall.sh](REFERENCE-0-preinstall.md)
* [archtitus.sh](REFERENCE-archtitus.md)
* [scripts/1-setup.sh](REFERENCE-1-setup.md)
* [scripts/3-post-setup.sh](REFERENCE-3-post-setup.md)
* [scripts/2-user.sh](REFERENCE-2-user.md)

View File

@ -1,4 +1,8 @@
#!/bin/bash
#github-action genshdoc
#
# @file ArchTitus
# @brief Entrance script that launches children scripts for each phase of installation.
# Find the name of the folder the scripts are in
set -a

44
pkg-files/awesome.text Normal file
View File

@ -0,0 +1,44 @@
awesome
lightdm
lightdm-gtk-greeter
thunar
lxsession
rxvt-unicode
--END OF MINIMAL INSTALL--
alsa-utils
pulseaudio
pulseaudio-alsa
wireless_tools
zsh
dunst
rofi
feh
lightdm-webkit2-greeter
lightdm-webkit-theme-litarvan
lxappearance
qt5ct
gsimplecal
xautolock
xclip
scrot
thunar-archive-plugin
thunar-volman
thunar-media-tags-plugin
tumbler
jq
w3m
geany
nano
viewnior
pavucontrol
parcellite
neofetch
htop
picom
gtk2-perl
xfce4-power-manager
imagemagick
playerctl
xsettingsd
obconf

View File

@ -1,3 +1,3 @@
xfce4
xfce-goodies
xfce4-goodies
--END OF MINIMAL INSTALL--

View File

@ -7,7 +7,10 @@
# ██║ ██║██║ ██║╚██████╗██║ ██║ ██║ ██║ ██║ ╚██████╔╝███████║
# ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝
#-------------------------------------------------------------------------
#github-action genshdoc
#
# @file Preinstall
# @brief Contains the steps necessary to configure and pacstrap the install to selected drive.
echo -ne "
-------------------------------------------------------------------------
█████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗
@ -69,6 +72,7 @@ echo -ne "
Creating Filesystems
-------------------------------------------------------------------------
"
# @description Creates the btrfs subvolumes.
createsubvolumes () {
btrfs subvolume create /mnt/@
btrfs subvolume create /mnt/@home
@ -77,6 +81,7 @@ createsubvolumes () {
btrfs subvolume create /mnt/@.snapshots
}
# @description Mount all btrfs subvolumes after root has been mounted.
mountallsubvol () {
mount -o ${MOUNT_OPTIONS},subvol=@home ${partition3} /mnt/home
mount -o ${MOUNT_OPTIONS},subvol=@tmp ${partition3} /mnt/tmp
@ -84,6 +89,7 @@ mountallsubvol () {
mount -o ${MOUNT_OPTIONS},subvol=@.snapshots ${partition3} /mnt/.snapshots
}
# @description BTRFS subvolulme creation and mounting.
subvolumesetup () {
# create nonroot subvolumes
createsubvolumes

View File

@ -1,4 +1,8 @@
#!/usr/bin/env bash
#github-action genshdoc
#
# @file Setup
# @brief Configures installed system, installs base packages, and creates user.
echo -ne "
-------------------------------------------------------------------------
█████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗

View File

@ -1,4 +1,8 @@
#!/usr/bin/env bash
#github-action genshdoc
#
# @file User
# @brief User customizations and AUR package installation.
echo -ne "
-------------------------------------------------------------------------
█████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗

View File

@ -1,4 +1,8 @@
#!/usr/bin/env bash
#github-action genshdoc
#
# @file Post-Setup
# @brief Finalizing installation configurations and cleaning up after script.
echo -ne "
-------------------------------------------------------------------------
█████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗
@ -102,6 +106,8 @@ systemctl enable NetworkManager.service
echo " NetworkManager enabled"
systemctl enable bluetooth
echo " Bluetooth enabled"
systemctl enable avahi-daemon.service
echo " Avahi enabled"
if [[ "${FS}" == "luks" || "${FS}" == "btrfs" ]]; then
echo -ne "

View File

@ -1,15 +1,21 @@
#!/usr/bin/env bash
# This script will ask users about their prefrences
# like disk, file system, timezone, keyboard layout,
# user name, password, etc.
#github-action genshdoc
#
# @file Startup
# @brief This script will ask users about their prefrences like disk, file system, timezone, keyboard layout, user name, password, etc.
# @stdout Output routed to startup.log
# @stderror Output routed to startup.log
# set up a config file
# @setting-header General Settings
# @setting CONFIG_FILE string[$CONFIGS_DIR/setup.conf] Location of setup.conf to be used by set_option and all subsequent scripts.
CONFIG_FILE=$CONFIGS_DIR/setup.conf
if [ ! -f $CONFIG_FILE ]; then # check if file exists
touch -f $CONFIG_FILE # create file if not exists
fi
# set options in setup.conf
# @description set options in setup.conf
# @arg $1 string Configuration variable.
# @arg $2 string Configuration value.
set_option() {
if grep -Eq "^${1}.*" $CONFIG_FILE; then # check if option exists
sed -i -e "/^${1}.*/d" $CONFIG_FILE # delete option if exists
@ -30,6 +36,45 @@ set_password() {
fi
}
root_check() {
if [[ "$(id -u)" != "0" ]]; then
echo -ne "ERROR! This script must be run under the 'root' user!\n"
exit 0
fi
}
docker_check() {
if awk -F/ '$2 == "docker"' /proc/self/cgroup | read -r; then
echo -ne "ERROR! Docker container is not supported (at the moment)\n"
exit 0
elif [[ -f /.dockerenv ]]; then
echo -ne "ERROR! Docker container is not supported (at the moment)\n"
exit 0
fi
}
arch_check() {
if [[ ! -e /etc/arch-release ]]; then
echo -ne "ERROR! This script must be run in Arch Linux!\n"
exit 0
fi
}
pacman_check() {
if [[ -f /var/lib/pacman/db.lck ]]; then
echo "ERROR! Pacman is blocked."
echo -ne "If not running remove /var/lib/pacman/db.lck.\n"
exit 0
fi
}
background_checks() {
root_check
arch_check
pacman_check
docker_check
}
# Renders a text based list of options that can be selected by the
# user using up, down and enter keys and returns the chosen option.
#
@ -139,6 +184,8 @@ select_option() {
return $(( $active_col + $active_row * $colmax ))
}
# @description Displays ArchTitus logo
# @noargs
logo () {
# This will be shown on every set as user is progressing
echo -ne "
@ -154,9 +201,9 @@ echo -ne "
------------------------------------------------------------------------
"
}
filesystem () {
# This function will handle file systems. At this movement we are handling only
# @description This function will handle file systems. At this movement we are handling only
# btrfs and ext4. Others will be added in future.
filesystem () {
echo -ne "
Please Select your file system for both boot and root
"
@ -174,6 +221,7 @@ case $? in
*) echo "Wrong option please select again"; filesystem;;
esac
}
# @description Detects and sets timezone.
timezone () {
# Added this from arch wiki https://wiki.archlinux.org/title/System_time
time_zone="$(curl --fail https://ipapi.co/timezone)"
@ -196,6 +244,7 @@ case ${options[$?]} in
*) echo "Wrong option. Try again";timezone;;
esac
}
# @description Set user's keyboard mapping.
keymap () {
echo -ne "
Please select key board layout from this list"
@ -209,6 +258,7 @@ echo -ne "Your key boards layout: ${keymap} \n"
set_option KEYMAP $keymap
}
# @description Choose whether drive is SSD or not.
drivessd () {
echo -ne "
Is this an ssd? yes/no:
@ -226,7 +276,7 @@ case ${options[$?]} in
esac
}
# selection for disk type
# @description Disk selection for drive to be used with installation.
diskpart () {
echo -ne "
------------------------------------------------------------------------
@ -249,6 +299,8 @@ echo -e "\n${disk%|*} selected \n"
drivessd
}
# @description Gather username and password to be used for installation.
userinfo () {
read -p "Please enter your username: " username
set_option USERNAME ${username,,} # convert to lower case as in issue #109
@ -257,6 +309,7 @@ read -rep "Please enter your hostname: " nameofmachine
set_option NAME_OF_MACHINE $nameofmachine
}
# @description Choose AUR helper.
aurhelper () {
# Let the user choose AUR helper from predefined list
echo -ne "Please enter your desired AUR helper:\n"
@ -266,15 +319,17 @@ aurhelper () {
set_option AUR_HELPER $aur_helper
}
# @description Choose Desktop Environment
desktopenv () {
# Let the user choose Desktop Enviroment from predefined list
echo -ne "Please select your desired Desktop Enviroment:\n"
options=(gnome kde cinnamon xfce mate budgie lxde deepin openbox server)
options=( `for f in pkg-files/*.txt; do echo "$f" | sed -r "s/.+\/(.+)\..+/\1/;/pkgs/d"; done` )
select_option $? 4 "${options[@]}"
desktop_env=${options[$?]}
set_option DESKTOP_ENV $desktop_env
}
# @description Choose whether to do full or minimal installation.
installtype () {
echo -ne "Please select type of installation:\n\n
Full install: Installs full featured desktop enviroment, with added apps and themes needed for everyday use\n
@ -289,6 +344,7 @@ installtype () {
# language (){}
# Starting functions
background_checks
clear
logo
userinfo