Skip to content

Commit

Permalink
Merge pull request #72 from scruffaluff/feature/remove-bloatware
Browse files Browse the repository at this point in the history
Feature/remove bloatware
  • Loading branch information
scruffaluff authored Oct 31, 2024
2 parents c0225bc + 6095c4a commit ba5087c
Show file tree
Hide file tree
Showing 28 changed files with 215 additions and 202 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
- name: Test installation, setup, and bootstrapping
env:
BOOTWARE_GITHUB_TOKEN: ${{ github.token }}
uses: vmactions/freebsd-vm@v1
with:
envs: BOOTWARE_GITHUB_TOKEN
prepare: |
sudo freebsd-update fetch
sudo freebsd-update install
Expand Down Expand Up @@ -223,6 +226,8 @@ jobs:
- name: Install dependencies for Bootware
run: bootware setup
- name: Test bootstrapping
env:
BOOTWARE_GITHUB_TOKEN: ${{ github.token }}
run: >-
bootware bootstrap --dev --no-passwd --retries 3 --tags desktop,extras
# Yazi hangs during startup on GitHub Arm64 MacOS runners.
Expand Down Expand Up @@ -390,6 +395,8 @@ jobs:
# 03/09/2024 respectively due to hash checksum issues. As of 09/08/2024,
# QEMU installer experiences timeout issues.
- name: Test bootstrapping
env:
BOOTWARE_GITHUB_TOKEN: ${{ github.token }}
run: |
$Env:Path = "C:\Program Files\Bootware;$Env:Path"
bootware bootstrap --dev --no-setup --retries 3 --skip ffsend,qemu,qsv --tags desktop,extras
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

### Added

- Android Studio role.

### Removed

- Gcloud, Packer, and Vault roles.
- Gcloud, Go, Packer, and Vault roles.

## 0.8.2 - 2024-09-30

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ chars = "\ue002"
key = "]"
mods = "Control"

[shell]
[terminal.shell]
args = ["{{ '-NoLogo' if ansible_system == 'Win32NT' else '--login' }}"]
program = "{{ user_shell }}"
{% if ansible_system == "Darwin" %}
Expand Down
67 changes: 34 additions & 33 deletions ansible_collections/scruffaluff/bootware/roles/bash/files/bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,17 @@
# For more information, visit
# https://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html.

# Convenience variables.
#
# Do not use long form flags for uname. They are not supported on MacOS. Command
# "(brew --prefix)" will give the incorrect path when sourced on Apple silicon
# and running under an Rosetta 2 emulated terminal.
# Public convenience interactive functions.

# Override system implementation of command not found.
#
# Flags:
# -d: Check if path is a directory.
# -s: Show operating system kernel name.
if [[ -d '/opt/homebrew' ]]; then
_brew_prefix='/opt/homebrew'
else
_brew_prefix='/usr/local'
fi
_os="$(uname -s)"
_tty="$([[ "$-" =~ 'i' ]] && echo 'true' || echo '')"
# Some system implementations will perform a long lookup to see if a package
# provides the command.
command_not_found_handle() {
echo "Error: command '${1}' not found" >&2
}

# Public convenience script functions.

# Prepend existing directories that are not in the system path.
#
Expand Down Expand Up @@ -49,6 +44,23 @@ source_files() {
done
}

# Private convenience variables.
#
# Do not use long form flags for uname. They are not supported on MacOS. Command
# "(brew --prefix)" will give the incorrect path when sourced on Apple silicon
# and running under an Rosetta 2 emulated terminal.
#
# Flags:
# -d: Check if path is a directory.
# -s: Show operating system kernel name.
if [[ -d '/opt/homebrew' ]]; then
_brew_prefix='/opt/homebrew'
else
_brew_prefix='/usr/local'
fi
_os="$(uname -s)"
_tty="$([[ "$-" =~ 'i' ]] && echo 'true' || echo '')"

# Shell settings.

# Add alias for remove by force.
Expand Down Expand Up @@ -133,6 +145,13 @@ fi
export COMPOSE_DOCKER_CLI_BUILD='true' DOCKER_BUILDKIT='true' \
DOCKER_CLI_HINTS='false'

# FFmpeg settings.

# Disable verbose FFmpeg banners.
alias ffmpeg='ffmpeg -hide_banner'
alias ffplay='ffplay -hide_banner'
alias ffprobe='ffprobe -hide_banner'

# Fzf settings.

# Add path preview to Fzf file finder.
Expand Down Expand Up @@ -173,24 +192,6 @@ if [[ -n "${_tty}" && -x "$(command -v fzf)" ]]; then
bind -x '"\C-f": fzf-file-widget'
fi

# Go settings.

# Export Go root directory to system path if available.
#
# Flags:
# -d: Check if path is a directory.
if [[ -d "${_brew_prefix}/opt/go/libexec" ]]; then
export GOROOT="${_brew_prefix}/opt/go/libexec"
prepend_paths "${GOROOT}/bin"
elif [[ -d '/usr/local/go' ]]; then
export GOROOT='/usr/local/go'
prepend_paths "${GOROOT}/bin"
fi

# Set path for Go local binaries.
export GOPATH="${HOME}/.go"
prepend_paths "${GOPATH}/bin"

# Helix settings.

# Set full color support for terminal and default editor to Helix.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@

- name: Get latest Croc version for Linux
ansible.builtin.uri:
headers: "{{ github_api_headers }}"
method: GET
return_content: true
url: https://api.github.com/repos/schollz/croc/releases/latest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
---
bloatware_linux_packages_:
always: []
apk:
- command-not-found
apt:
- command-not-found
dnf:
- PackageKit-command-not-found
essential_linux_packages_:
always:
- acl
Expand Down Expand Up @@ -50,6 +58,9 @@ essential_linux_packages_:
- which
- xz
- zip
bloatware_linux_packages: >-
{{ bloatware_linux_packages_.always +
bloatware_linux_packages_.get(ansible_pkg_mgr, []) }}
essential_linux_packages: >-
{{ essential_linux_packages_.always +
essential_linux_packages_.get(ansible_pkg_mgr, []) }}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
- zip
when: ansible_system == "FreeBSD"

- name: Remove bloatware packages for Linux
ansible.builtin.package:
name: "{{ item }}"
state: absent
become: true
loop: "{{ bloatware_linux_packages }}"
when: ansible_system == "Linux"

- name: Install essential packages for Linux
ansible.builtin.package:
name: "{{ item }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,30 +94,6 @@ function _ssh_session
end
end

# Source shell files if they exist.
#
# Flags:
# -f: Check if file exists and is a regular file.
function _source_files
for inode in $argv
if test -f $inode
source $inode
end
end
end

# Source Bash files if they exist.
#
# Flags:
# -f: Check if file exists and is a regular file.
function _source_bash_files
for inode in $argv
if test -f $inode
bass source $inode
end
end
end

# Public convenience interactive functions.

# Open Fish history file with default editor.
Expand All @@ -130,6 +106,14 @@ function edit-history
end
end

# Override system implementation of command not found.
#
# Some system implementations will perform a long lookup to see if a package
# provides the command.
function fish_command_not_found
echo "Error: command '$argv[1]' not found" >&2
end

# Public convenience script functions.

# Prepend existing directories that are not in the system path.
Expand All @@ -148,6 +132,30 @@ function prepend_paths
end
end

# Source Bash files if they exist.
#
# Flags:
# -f: Check if file exists and is a regular file.
function source_bash_files
for inode in $argv
if test -f $inode
bass source $inode
end
end
end

# Source shell files if they exist.
#
# Flags:
# -f: Check if file exists and is a regular file.
function source_files
for inode in $argv
if test -f $inode
source $inode
end
end
end

# Private convenience variables.
#
# Do not use long form flags for uname. They are not supported on MacOS. Command
Expand Down Expand Up @@ -271,6 +279,13 @@ set --export COMPOSE_DOCKER_CLI_BUILD true
set --export DOCKER_BUILDKIT true
set --export DOCKER_CLI_HINTS false

# FFmpeg settings.

# Disable verbose FFmpeg banners.
alias ffmpeg 'ffmpeg -hide_banner'
alias ffplay 'ffplay -hide_banner'
alias ffprobe 'ffprobe -hide_banner'

# Fzf settings.

# Add path preview to Fzf file finder.
Expand Down Expand Up @@ -310,24 +325,6 @@ if test -n $_tty; and type -q fzf
bind \cf fzf-file-widget
end

# Go settings.

# Export Go root directory to system path if available.
#
# Flags:
# -d: Check if path is a directory.
if test -d "$_brew_prefix/opt/go/libexec"
set --export GOROOT "$_brew_prefix/opt/go/libexec"
prepend_paths "$GOROOT/bin"
else if test -d /usr/local/go
set --export GOROOT /usr/local/go
prepend_paths "$GOROOT/bin"
end

# Set path for Go local binaries.
set --export GOPATH "$HOME/.go"
prepend_paths "$GOPATH/bin"

# Helix settings.

# Set full color support for terminal and default editor to Helix.
Expand Down Expand Up @@ -522,6 +519,6 @@ end
# Flags:
# -q: Only check for exit status by supressing output.
if type -q bass
_source_bash_files "$HOME/.env" "$HOME/.secrets"
source_bash_files "$HOME/.env" "$HOME/.secrets"
end
_source_files "$HOME/.env.fish" "$HOME/.secrets.fish"
source_files "$HOME/.env.fish" "$HOME/.secrets.fish"
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@

- name: Get latest GitHub Runner version for Unix
ansible.builtin.uri:
headers: "{{ github_api_headers }}"
method: GET
return_content: true
url: https://api.github.com/repos/actions/runner/releases/latest
Expand All @@ -125,6 +126,7 @@

- name: Get latest GitHub Runner version for Windows
ansible.windows.win_uri:
headers: "{{ github_api_headers }}"
method: GET
return_content: true
url: https://api.github.com/repos/actions/runner/releases/latest
Expand Down
7 changes: 0 additions & 7 deletions ansible_collections/scruffaluff/bootware/roles/go/README.md

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit ba5087c

Please sign in to comment.