From aa15f420716be5f2316dbb12d6fea91cfdfef449 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Fri, 22 Nov 2024 15:13:28 -0600 Subject: adding spec to think everything through --- spec.org | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 spec.org (limited to 'spec.org') diff --git a/spec.org b/spec.org new file mode 100644 index 0000000..9cbaf11 --- /dev/null +++ b/spec.org @@ -0,0 +1,103 @@ + +ArchSetup Specification + +This setup should allow the user to: +- run a command from the live iso to start installation +- run a command from the live iso to setup the ssh server for remote install + +- tools to manage their dotfiles + - see what's changed and reject or commit changes to the repository + - easily adopt new dotfiles into the setup + +* Workflows / Use Cases +** Install Arch Linux +*** Kick off the init file via curl +To create a new arch linux workstation, + +boot from any Arch Linux iso burned on a flash drive. + +issue the command +"curl -s https://cjennings.net/archsetup/init | sh" +... and have the process should begin. +**** TODO Figure out what needs to occur for this to happen. + +*** Init +- ask the user if they wish to setup archlinux or setup ssh +- if response not "arch" or "ssh", error and stop. + +#+begin_src shell + echo "Do you wish to setup archlinux or setup ssh? " + read setup + + if [ "$setup" = "arch" ]; then + echo "Setting up Arch Linux..." + # Call arch setup script + sh /path/to/archlinux_setup_script.sh + + elif [ "$setup" = "ssh" ]; then + setup_ssh # function below + + else + echo "Error: Unknown setup option. Please choose 'arch' or 'ssh'." + exit 1 + fi + +#+end_src + +*** Prepare SSH +- change root user password to welcome +- make sure ssh server is setup +- find the hostname +- report back to the user with the root@ip and root@hostname prompt to use. + +#+begin_src shell + setup_ssh () { + systemctl start sshd + + echo "root:welcome" | chpasswd + hostname=$(