mohdfareed / machine

0 stars 0 forks source link

Machine

This is a Python project that provides a collection of modules for setting up various aspects of a machine, along with a library of utility modules that are used throughout the project.

Usage

To set up the machine, run the following command:

url=https://raw.githubusercontent.com/mohdfareed/machine/main/bootstrap.py
curl -fsSL $url | python3 - [-f|--force] [-h|--help]

Where the arguments are as follows:

The repo expects the following files and directories to be present on the machine:

Individual Setup

Individual machine components can be set up by running the respective setup module, provided that the bootstrapping script has already been run. Run the following command to set up a component:

python -m scripts.component [-h]

Project Structure

The project has the following hard-coded structure:

Raspberry Pi

A locally-configured Raspberry Pi is configured by setting up the machine directory on the Pi. The raspberrypi directory contains the configuration files used by the Pi, which are copied to the machine directory on the Pi. The script acts similarly to the bootstrap.py script, except that is adds the setup entrypoint to the path without running it. To setup the Pi after running this script, run:

setup-machine

The initial setup of the Raspberry Pi (done before running this script) is done by installing Raspberry Pi OS Lite (x64) on an SD card and configuring it as following: