Cleaned up the scripts a little and disabled umask (seems to break stuff on deb based distros, giving up for now)

This commit is contained in:
Pol Kaulfield 2025-05-29 17:30:35 -04:00
parent f94d38d985
commit 58b1b79573
2 changed files with 16 additions and 23 deletions

View File

@ -86,18 +86,7 @@ function load_config() {
if [[ -f "$SCRIPT_DIR/config.sh" ]]; then
. "$SCRIPT_DIR/config.sh"
else
>&2 echo "Unable to find default config file $SCRIPT_DIR/default_config.sh, aborting."
exit 1
fi
}
# Verify that necessary configuration values are set and they are valid
function check_config() {
local expected_config_version
expected_config_version="0.4"
if [[ "$CONFIG_FILE_VERSION" != "$expected_config_version" ]]; then
>&2 echo "Invalid or old config version $CONFIG_FILE_VERSION, expected $expected_config_version. Please update your configuration file from the default."
>&2 echo "Unable to find default config file $SCRIPT_DIR/config.sh, aborting."
exit 1
fi
}
@ -210,7 +199,6 @@ function build_iso() {
cd $SCRIPT_DIR
load_config
check_config
check_host
# check number of args

25
scripts/config.sh Normal file → Executable file
View File

@ -68,6 +68,19 @@ function add_mullvad_browser()
apt install -y mullvad-browser
}
restore_firefox() {
wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- > /etc/apt/keyrings/packages.mozilla.org.asc
echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" > /etc/apt/sources.list.d/mozilla.list
echo '
Package: *
Pin: origin packages.mozilla.org
Pin-Priority: 1000
' > /etc/apt/preferences.d/mozilla
apt update
apt install firefox -y
}
function remove_snaps() {
while [ "$(snap list | wc -l)" -gt 0 ]; do
for snap in $(snap list | tail -n +2 | cut -d ' ' -f 1); do
@ -187,11 +200,6 @@ function install_debs()
done
}
function harden_umask()
{
sed -i 's/^HOME_MODE.*/HOME_MODE\t0700/g' /etc/login.defs
}
function cleanup() {
rm -rf /tmp/* ~/.bash_history
export HISTSIZE=0
@ -207,17 +215,14 @@ function customize_image() {
add_flatpak
add_brave
add_signal
restore_firefox
#add_mullvad_browser
install_debs
#disable_cups
disable_cups
disable_avahi
install_firewall
remove_packages
harden_umask
branding
cleanup
}
# Used to version the configuration. If breaking changes occur, manual
# updates to this file from the default may be necessary.
export CONFIG_FILE_VERSION="0.4"