https://github.com/yaphott/ubuntu-config-scripts
Development environment configuration scripts for Ubuntu Desktop (22.04)
https://github.com/yaphott/ubuntu-config-scripts
configuration developer-environment ubuntu
Last synced: 3 months ago
JSON representation
Development environment configuration scripts for Ubuntu Desktop (22.04)
- Host: GitHub
- URL: https://github.com/yaphott/ubuntu-config-scripts
- Owner: yaphott
- License: mit
- Created: 2022-09-01T00:08:31.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-17T01:24:46.000Z (over 2 years ago)
- Last Synced: 2024-12-29T19:58:18.138Z (about 1 year ago)
- Topics: configuration, developer-environment, ubuntu
- Language: Shell
- Homepage:
- Size: 67.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ubuntu-config-scripts
Development environment configuration scripts for Ubuntu Desktop (22.04).
**Not intended for production. Use at your own risk!**
**Goal:** Reduce the time it takes to configure a new Ubuntu Desktop environment for software development.

## Usage
1. Clone the repo:
```bash
git clone https://github.com/yaphott/ubuntu-config-scripts.git
```
2. Run the script:
```bash
cd ubuntu-config-scripts
bash ./run.sh
```
3. A system upgrade will commence and the **system will prompt to reboot**.
4. After rebooting, **run the script once more and respond to any prompts**.
## Testing with Vagrant
Testing occurs in 2 steps.
1. Provision a base box and create a snapshot.
2. Restore the snapshot and run the configuration scripts.
Creating the snapshot reduces the overall time needed to test the configuration scripts in a clean environment.
First time (base box + main box):
```bash
make test-cold
```
Subsequent times (main box):
```bash
make test-hot
```
> **Note**: Password for the user is `vagrant`.
### Convenience Scripts
#### `bin/utils/add_keyring.sh`
Add a keyring to the system by providing a URL to the keyring and the complete desired path to the keyring file.
```bash
sudo add_keyring.sh
```
For example:
```bash
cd ./bin/utils
sudo bash add_keyring.sh https://example.com/apt/keys.asc \
/etc/apt/keyrings/example-keyring.gpg
```
#### `bin/utils/add_repository.sh`
Add a repository to the system by providing the **key URL**, **distribution**, **components**, and the **destination path for the list file**.
```bash
sudo add_repository.sh
```
For example, if there is **one component**:
```bash
cd ./bin/utils
sudo add_repository.sh "arch=amd64 signed-by=/etc/apt/keyrings/example-keyring.gpg" \
https://example.com/example-pub.gpg \
stable \
main \
/etc/apt/sources.list.d/example.list
```
Or if there are **multiple components**:
```bash
cd ./bin/utils
sudo add_repository.sh "arch=amd64 signed-by=/etc/apt/keyrings/example-keyring.gpg" \
https://example.com/example-pub.gpg \
stable \
"main contrib non-free" \
/etc/apt/sources.list.d/example.list
```
Or if there are **no components**:
```bash
cd ./bin/utils
sudo add_repository.sh "arch=amd64 signed-by=/etc/apt/keyrings/example-keyring.gpg" \
https://example.com/example-pub.gpg \
stable \
none \
/etc/apt/sources.list.d/example.list
```
> See [Ubuntu Manpage: `sources.list`](https://manpages.ubuntu.com/manpages/xenial/man5/sources.list.5.html) for more information on the format of the list file.