summaryrefslogtreecommitdiff
path: root/spec.org
blob: 9cbaf11e557f190bc552a05626699ffb0431ec1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
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=$(</etc/hostname)
      ipaddress=$(ip addr show wlan0 | grep 'inet ' | awk '{print $2}' | cut -d/ -f1)

      echo ""; echo ""; echo "init complete. "
      echo "you may ssh root@$hostname or ssh root@$ipaddress using the password 'welcome'"
  }
#+end_src

*** Installation
-
- ask user which drive to install on
  - display all the drives and have the user choose one
  - report the partitions and sizes, and confirm.
  - use wipe and discard to make sure the


** Updating Dotfiles


** Makefile

I need a GNU Makefile that does the following:

when "make stow" is called:
- delete the file at $HOME/.zshrc_history
- run the command "stow --restow --no-folding system"

when "make t-export" is called:
- run the command "tar -jcvf thunderbird-email-profile.tar.bz2 $HOME/.thunderbird"
- verify that thunderbird-email-profile.tar.bz2 exists. halt with an error if it doesn't exist.
- copy thunderbird-email-profile.tar.bz2 to the current directory.
- run the command "gpg -c thunderbird-email-profile.tar.bz2"
- run the command "rm thunderbird-email-profile.tar.bz2"

when "make t-restore" is called:
- verify that thunderbird-email-profile.tar.bz2 exists. halt with an error if it doesn't exist.
- run the command gpg thunderbird-email-profile.tar.bz2.gpg
-


when "make arch" is called:
- run "git pull origin main"
- run "sh $(pwd)archsetup"

when make "make commit" is called
- run