I was able to find a Linux version of software called EndlessOS however this software will not run on the hardware I have available (e.g. Macbook Pro Retina Late 2012). The goal is to create a safe and secure OS for kiddos to use and learn about computers. I decided to use Ansible to setup the system so that I can reproduce it in case it crashes and always have a clean record of what software is installed on the system. This is a work in progress and several things require manual configuration at this point so do not expect to use this out of the box and expect a polished and clean OS like EndlessOS. I am leveraging the work found from Ian Cleary which is a robust framework to configure a Linux OS although I will use about 2 percent of this framework there is a huge amount of additional capability which may be leveraged and used in the future.
Thanks to all those who contributed to the prior efforts to develop this framework. See the Authors section below for a full list on contributors to open source framework.
- Download the latest Desktop version of the Ubuntu LTS branch for the architecture you are working with
- Select Minimal Desktop Version during install
- I am running a Macbook and the WiFi drivers require the the proprietery option to be checked. It is on the same installer tab as the Minimal Version Selection
- See New Desktop Setup, New Terminal/Server Setup, or Existing Machine setup options below for
I am only using LTS versions and there are no plans to support non-LTS versions.
LTS | Last Supported Branch/Tag |
---|---|
Ubuntu 20.04.03 | main |
I've disabled most of the tags and roles in the default_config.yml but left them all there for future use. See source repo for all available roles and tasks available in this framework
zsh
andoh-my-zsh
- colorls: A Ruby script that colorizes the ls output with color and icons.
- VSCode,
- VS Code Extensions
Flatpak
,Snap
,
- Flatseal: Manage flatpak permissions
Spotify
,
For a new machine, I run the following command to set up my computer:
Please make sure you adjust your hostname as Ansible keys off this variable. I like to do this during the initial configuration of the machine.
This will prompt you for your sudo
password
for the bash script and then once later for
ansible
's "BECOME PASSWORD" prompt.
Voila! πππ
wget -qO- \
https://github.com/seadogger/EndlessUbuntuOS/raw/main/run_terminal.sh | \
bash
cd ~Personal\EndlessUbuntuOS
make install
sudo reboot now
wget -qO- \
https://github.com/seadogger/EndlessUbuntuOS/raw/main/run_desktop.sh | \
bash
cd ~Personal\EndlessUbuntuOS
make install
sudo reboot now
On an existing machine, I run the following bash command, to ensure I am consistent with my playbook
make all
This target runs four other targets in series:
bootstrap
bootstrap-check
install
non-ansible
Let's go through each.
This installs several packages with apt
and
python packages per the requirements-ansible.txt file.
This includes Ansible, using Python3.
This also moves the home-local-bin.sh
file to the /etc/profile.d/
folder as described above.
The
yarn
roles does a similar operation, except with Ansible instead of bash.
This is to confirm both the ansible
and psutil
Python3 packages are installed and on the $PATH
.
If the pip installation falls back to using the --user
flag,
packages will be located in the following directory under $HOME
:
Goal:
export PATH="$HOME/.local/bin:$PATH"
without duplication!
#/etc/profile.d/home-local-bin.sh
addToPATH() {
case ":$PATH:" in
*":$1:"*) :;; # already there
*) PATH="$1:$PATH";; # or PATH="$PATH:$1"
esac
}
# Important for python pip packages installed with --user
addToPATH "$HOME/.local/bin"
make bootstrap
will set this up for you!
Source: duplicate-entries-in-path-a-problem
This runs the playbook.yml
Ansible playbook.
The following two commands yield the same bash command:
make install
ansible-playbook playbook.yml \
-i inventory \
--ask-become-pass \
-e '{"users": [{"username": "$(shell whoami)"}]}'
Note:
$(shell whoami)
in a Makefile translates to$(whoami)
in bash.
The "-e" is for extra variable and is from my Ansible Galaxy role iancleary/ansible-role-zsh#example-playbook
This the targets that I found easier to maintain with bash or Makefile scripts.
# configure Flameshot with gsettings to bind to PrtScr
make flameshot-keybindings
# Ubuntu 20.04 defaults
make python-three-eight-install
make python-three-eight-supporting
...
make check
andmake install
are two of the standard Makefile targets for this repo.
Not everyone's development environment and preferred software configuration is the same.
You can override any of the defaults configured in default.config.yml
by creating a config.yml
file and setting the overrides in that file. For example, you can customize the installed packages and apps with something like:
nodejs_version: "14.x"
nodejs_npm_global_packages:
- name: "@vue/cli"
- name: "nativefier"
- name: "markdownlint-cli"
- name: "carbon-now-cli"
Any variable can be overridden in config.yml
; see the supporting roles' documentation for a complete list of available variables.
- Any content in the
config.yml
has the highest precedence (not version controlled; sensitive) - The version controlled default.config.yml file.
This allows hostnames to remain private outside of version control, for say secret operations π΅οΈ
For example, a config.yml
could contain:
---
nodejs_npm_global_packages:
- name: "@vue/cli"
- name: "@gridsome/cli"
For example, a default.config.yml
could contain:
---
nodejs_npm_global_packages:
- name: "@vue/cli"
Then run make all
Voila (with your edits)! πππ
Investigate this folder and your ~/.bashrc, ~/.zshrc, etc. files will become simpler and more maintainable! π
Let's stuff a few more lines of configuration into that file, it will be fine π¬π¬π¬π¬.
Tl;dr is that most shells source all files in that folder,
similar to source ~/.bashrc
on a fresh Ubuntu install.
The main advantage for using the /etc/profile.d/
folder
is that it is modular and maintainable.
Fast forward to your using that folder as it was intended.
A zen like calm washes over you now that there is a single file per application and use case!
Your messy filing cabinet of assorted patches is no more. π₯
The
. /etc/profile
command is used to manually source the `/etc/profile.d/ folder.
See CHANGELOG for history.
Linting is performed on common file types:
- YAML files with yamllint
- Bash files with shellcheck
- Markdown files with markdownlint-cli
Notable Ansible Modules Used with regards to dependencies
- snap
- This drives the ansible >=2.8.0 requirement
I benefited from the source work of others, see AUTHORS.md.
My choice to open source my work here is to share back with you.
If you wish to contribute, see CONTRIBUTING.md