Refactor directory structure

This commit is contained in:
Manuel Thalmann 2023-01-23 14:19:26 +01:00
parent 7cc0136bec
commit 0d88f63cfa
39 changed files with 98 additions and 95 deletions

View file

@ -1,18 +0,0 @@
workingDirectory="$(pwd)"
contextRoot="$(mktemp -d)"
cd "$contextRoot"
sudo apt install -y \
build-essential meson ninja-build pkg-config libgnutls28-dev openssl \
python3-pip python3-yaml python3-ply python3-jinja2 \
qtbase5-dev libqt5core5a libqt5gui5 libqt5widgets5 qttools5-dev-tools \
libtiff-dev libevent-dev libyaml-dev \
gstreamer1.0-tools libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
git clone https://git.libcamera.org/libcamera/libcamera.git
cd libcamera
meson build -Dpipelines=uvcvideo,vimc,ipu3 -Dipas=vimc,ipu3 -Dprefix=/usr -Dgstreamer=enabled
ninja -C build
sudo ninja -C build install
cd "$workingDirectory"
rm -rf "$contextRoot"

View file

@ -1,13 +0,0 @@
#!/bin/bash
provider=$1
dirname=$2
serviceName=rclone@$provider:$dirname
echo "Please create a remote named $1"
rclone config
mkdir -p ~/$dirname
systemctl --user enable $serviceName
systemctl --user daemon-reload
systemctl --user start $serviceName

View file

@ -1,2 +0,0 @@
#!/bin/bash
source "${BASH_SOURCE%/*}/base.sh" nextcloud Nextcloud

View file

@ -1,14 +0,0 @@
#!/bin/bash
# Elevate script
if [ ! "$UID" -eq 0 ]
then
sudo bash "$BASH_SOURCE" "$USER"
else
homeDir=$(sudo -u $1 bash -c 'realpath ~')
fontFileBaseName="Caskaydia Cove Regular Nerd Font Complete.otf"
tempFile=$(sudo -u $1 mktemp -d)/$fontFileBaseName
destination=/usr/share/font/opentype
sudo -u $1 cp "$homeDir/Nextcloud/Caskaydia Cove Regular Nerd Font Complete.otf" "$tempFile"
cp "$tempFile" /usr/share/fonts/opentype
fi

View file

@ -1,890 +0,0 @@
{
"output": {
"blocklist": [],
"equalizer#0": {
"balance": 0.0,
"bypass": false,
"input-gain": 0.0,
"left": {
"band0": {
"frequency": 29.952623149688797,
"gain": 8.79,
"mode": "RLC (BT)",
"mute": true,
"q": 1.504760237537245,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band1": {
"frequency": 59.763340205038524,
"gain": 6.63,
"mode": "RLC (BT)",
"mute": true,
"q": 1.5047602375372453,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band2": {
"frequency": 119.24354052777788,
"gain": 5.5,
"mode": "RLC (BT)",
"mute": true,
"q": 1.504760237537245,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band3": {
"frequency": 237.92214271853953,
"gain": 3.5,
"mode": "RLC (BT)",
"mute": false,
"q": 1.504760237537245,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band4": {
"frequency": 474.71708526294935,
"gain": 1.0,
"mode": "RLC (BT)",
"mute": false,
"q": 1.5047602375372453,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band5": {
"frequency": 947.1851104970312,
"gain": -1.5,
"mode": "RLC (BT)",
"mute": false,
"q": 1.504760237537245,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band6": {
"frequency": 1889.8827562743609,
"gain": -2.0,
"mode": "RLC (BT)",
"mute": false,
"q": 1.5047602375372449,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band7": {
"frequency": 3770.811843303749,
"gain": -4.0,
"mode": "RLC (BT)",
"mute": false,
"q": 1.5047602375372449,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band8": {
"frequency": 7523.758767782307,
"gain": 2.5,
"mode": "RLC (BT)",
"mute": false,
"q": 1.5047602375372453,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band9": {
"frequency": 15011.87233627273,
"gain": 5.0,
"mode": "RLC (BT)",
"mute": false,
"q": 1.504760237537245,
"slope": "x1",
"solo": false,
"type": "Bell"
}
},
"mode": "IIR",
"num-bands": 10,
"output-gain": 0.0,
"pitch-left": 0.0,
"pitch-right": 0.0,
"right": {
"band0": {
"frequency": 29.952623149688797,
"gain": 8.79,
"mode": "RLC (BT)",
"mute": true,
"q": 1.504760237537245,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band1": {
"frequency": 59.763340205038524,
"gain": 6.63,
"mode": "RLC (BT)",
"mute": true,
"q": 1.5047602375372453,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band2": {
"frequency": 119.24354052777788,
"gain": 5.5,
"mode": "RLC (BT)",
"mute": true,
"q": 1.504760237537245,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band3": {
"frequency": 237.92214271853953,
"gain": 3.5,
"mode": "RLC (BT)",
"mute": false,
"q": 1.504760237537245,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band4": {
"frequency": 474.71708526294935,
"gain": 1.0,
"mode": "RLC (BT)",
"mute": false,
"q": 1.5047602375372453,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band5": {
"frequency": 947.1851104970312,
"gain": -1.5,
"mode": "RLC (BT)",
"mute": false,
"q": 1.504760237537245,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band6": {
"frequency": 1889.8827562743609,
"gain": -2.0,
"mode": "RLC (BT)",
"mute": false,
"q": 1.5047602375372449,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band7": {
"frequency": 3770.811843303749,
"gain": -4.0,
"mode": "RLC (BT)",
"mute": false,
"q": 1.5047602375372449,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band8": {
"frequency": 7523.758767782307,
"gain": 2.5,
"mode": "RLC (BT)",
"mute": false,
"q": 1.5047602375372453,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band9": {
"frequency": 15011.87233627273,
"gain": 5.0,
"mode": "RLC (BT)",
"mute": false,
"q": 1.504760237537245,
"slope": "x1",
"solo": false,
"type": "Bell"
}
},
"split-channels": false
},
"equalizer#1": {
"balance": 0.0,
"bypass": false,
"input-gain": 0.0,
"left": {
"band0": {
"frequency": 22.4,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band1": {
"frequency": 27.8,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band10": {
"frequency": 194.06,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band11": {
"frequency": 240.81,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band12": {
"frequency": 298.834,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band13": {
"frequency": 370.834,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band14": {
"frequency": 460.182,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band15": {
"frequency": 571.057,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band16": {
"frequency": 708.647,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band17": {
"frequency": 879.387,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band18": {
"frequency": 1091.26,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band19": {
"frequency": 1354.19,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band2": {
"frequency": 34.51,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band20": {
"frequency": 1680.47,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band21": {
"frequency": 2085.35,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band22": {
"frequency": 2587.79,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band23": {
"frequency": 3211.29,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band24": {
"frequency": 3985.01,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band25": {
"frequency": 4945.15,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band26": {
"frequency": 6136.63,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band27": {
"frequency": 7615.17,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band28": {
"frequency": 9449.96,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band29": {
"frequency": 11726.8,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band3": {
"frequency": 42.82,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band30": {
"frequency": 14552.2,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band31": {
"frequency": 18058.4,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band4": {
"frequency": 53.14,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band5": {
"frequency": 65.95,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band6": {
"frequency": 81.83,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band7": {
"frequency": 101.55,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band8": {
"frequency": 126.0,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band9": {
"frequency": 156.38,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
}
},
"mode": "IIR",
"num-bands": 32,
"output-gain": 0.0,
"pitch-left": 0.0,
"pitch-right": 0.0,
"right": {
"band0": {
"frequency": 22.4,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band1": {
"frequency": 27.8,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band10": {
"frequency": 194.06,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band11": {
"frequency": 240.81,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band12": {
"frequency": 298.834,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band13": {
"frequency": 370.834,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band14": {
"frequency": 460.182,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band15": {
"frequency": 571.057,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band16": {
"frequency": 708.647,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band17": {
"frequency": 879.387,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band18": {
"frequency": 1091.26,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band19": {
"frequency": 1354.19,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band2": {
"frequency": 34.51,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band20": {
"frequency": 1680.47,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band21": {
"frequency": 2085.35,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band22": {
"frequency": 2587.79,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band23": {
"frequency": 3211.29,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band24": {
"frequency": 3985.01,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band25": {
"frequency": 4945.15,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band26": {
"frequency": 6136.63,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band27": {
"frequency": 7615.17,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band28": {
"frequency": 9449.96,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band29": {
"frequency": 11726.8,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band3": {
"frequency": 42.82,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band30": {
"frequency": 14552.2,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band31": {
"frequency": 18058.4,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band4": {
"frequency": 53.14,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band5": {
"frequency": 65.95,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band6": {
"frequency": 81.83,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band7": {
"frequency": 101.55,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band8": {
"frequency": 126.0,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band9": {
"frequency": 156.38,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
}
},
"split-channels": false
},
"loudness#0": {
"bypass": false,
"clipping": false,
"clipping-range": 6.0,
"fft": "4096",
"input-gain": 0.0,
"output-gain": 0.0,
"std": "ISO226-2003",
"volume": -4.5
},
"plugins_order": [
"equalizer#0",
"loudness#0",
"equalizer#1"
]
}
}

View file

@ -1,2 +0,0 @@
#!/bin/bash
cp ${BASH_SOURCE%/*}/*.json ~/.var/app/com.github.wwmm.easyeffects/config/easyeffects/output/

View file

@ -1,22 +0,0 @@
#!/bin/bash
# Elevate script
if [ ! "$UID" -eq 0 ]
then
sudo bash "$BASH_SOURCE"
else
wget -qO - https://raw.githubusercontent.com/linux-surface/linux-surface/master/pkg/keys/surface.asc \
| gpg --dearmor | sudo dd of=/etc/apt/trusted.gpg.d/linux-surface.gpg
echo "deb [arch=amd64] https://pkg.surfacelinux.com/debian release main" \
| sudo tee /etc/apt/sources.list.d/linux-surface.list
apt update
apt install -y linux-image-surface linux-headers-surface iptsd libwacom-surface
systemctl enable iptsd
# Install DTX
package=$(mktemp)
wget https://github.com/linux-surface/surface-dtx-daemon/releases/download/v0.3.3-2/surface-dtx-daemon_0.3.3-2_amd64.deb -O $package
dpkg -i $package
rm -f $package
fi

View file

@ -1,94 +0,0 @@
#!/bin/bash
scriptRoot=$(realpath "${BASH_SOURCE%/*}")
# Elevate script
if [ ! "$UID" -eq 0 ]
then
sudo bash "$BASH_SOURCE"
bash "$scriptRoot/sign-modules.sh"
else
# Create context directory
workingDirectory="$(pwd)"
contextRoot="$(mktemp -d)"
packageName="shim.rpm"
cd "$contextRoot"
# Install Prerequisites
apt install -y wget rpm2cpio efitools
# Download and Extract Package
wget https://kojipkgs.fedoraproject.org/packages/shim/15.6/2/x86_64/shim-x64-15.6-2.x86_64.rpm -O "$packageName"
rpm2archive "$packageName"
tar -xvzf "$packageName.tgz"
rm -f "$packageName" "$packageName.tgz"
# Initialize variables
src="./boot/efi/EFI/fedora"
esp=/boot/efi
defaultBootDir=$esp/EFI/BOOT
microsoftBootDir=$esp/EFI/Microsoft/Boot
systemdDirName=/EFI/systemd
systemdFullName=$esp$systemdDirName
systemdFile=$systemdFullName/systemd-bootx64.efi
bootFile=$defaultBootDir/grubx64.efi
# Set up files
cp $systemdFile $bootFile
cp "$src/shimx64.efi" $defaultBootDir/BOOTx64.efi
cp "$src/mmx64.efi" $defaultBootDir
cp /usr/lib/efitools/x86_64-linux-gnu/KeyTool.efi /boot/efi/EFI/systemd/
wget https://github.com/tianocore/edk2-archive/raw/master/ShellBinPkg/UefiShell/X64/Shell.efi -O "$systemdFullName/Shell.efi"
{
echo "sbat,1,SBAT Version,sbat,1,https://github.com/rhboot/shim/blob/main/SBAT.md"
echo "systemd-boot,1,systemd,systemd-boot,1,https://systemd.io"
} > sbat.csv
# No idea where the `10000000` comes from...
# Taken from https://github.com/rhboot/shim/issues/376#issuecomment-964137621
objcopy --set-section-alignment '.sbat=512' --add-section .sbat=sbat.csv --change-section-address .sbat+10000000 "$bootFile"
# Add boot entries
efibootmgr --unicode --disk /dev/nvme0n1 --part 0 --create --label "Shim" --loader /EFI/BOOT/BOOTx64.efi
# Configure systemd-boot
{
echo "timeout 4"
} >> /boot/efi/loader/loader.conf
{
echo "title MokManager"
echo "efi /EFI/BOOT/mmx64.efi"
} > /boot/efi/loader/entries/MokManager.conf
{
echo "title KeyTool"
echo "efi /EFI/systemd/KeyTool.efi"
} > /boot/efi/loader/entries/KeyTool.conf
{
echo "title UEFI Shell"
echo "efi /EFI/systemd/Shell.efi"
} > /boot/efi/loader/entries/Shell.conf
# Install surface MOK
apt install -y linux-surface-secureboot-mok
# Install MOK Key
keyDir="/var/lib/shim-signed/mok"
mkdir -p "$keyDir"
cp "$scriptRoot/openssl.cnf" "$keyDir/openssl.cnf"
openssl req -config "$keyDir/openssl.cnf" \
-new -x509 -newkey rsa:2048 \
-nodes -days 36500 -outform DER \
-keyout "$keyDir/MOK.priv" \
-out "$keyDir/MOK.der"
mokutil --import "$keyDir/MOK.der"
# Remove context directory
cd $workingDirectory
rm -rf $contextRoot
fi

View file

@ -1,24 +0,0 @@
# This definition stops the following lines choking if HOME isn't
# defined.
HOME = .
RANDFILE = $ENV::HOME/.rnd
[ req ]
distinguished_name = req_distinguished_name
x509_extensions = v3
string_mask = utf8only
prompt = no
[ req_distinguished_name ]
countryName = CH
stateOrProvinceName = Zurich
localityName = Winterthur
0.organizationName = lordgizmo
commonName = Secure Boot Signing
emailAddress = m@nuth.ch
[ v3 ]
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always,issuer
basicConstraints = critical,CA:FALSE
extendedKeyUsage = codeSigning,1.3.6.1.4.1.311.10.3.6,1.3.6.1.4.1.2312.16.1.2
nsComment = "Secure Boot Signing"

View file

@ -1,15 +0,0 @@
#!/bin/bash
# Elevate script
if [ ! "$UID" -eq 0 ]
then
sudo bash "$BASH_SOURCE"
else
keyDir="/var/lib/shim-signed/mok"
keyFile="$keyDir/MOK.priv"
pubFile="$keyDir/MOK.der"
for file in $(find /lib/modules /var/lib/dkms -name *.ko);
do
kmodsign sha512 $keyFile $pubFile $file
done
fi

View file

@ -1,8 +0,0 @@
#!/bin/bash
# Elevate script
if [ ! "$UID" -eq 0 ]
then
sudo bash "$BASH_SOURCE"
else
apt install -y screen steam vim docker.io docker-compose
fi

View file

@ -1,19 +0,0 @@
#!/bin/bash
# Elevate script
if [ ! "$UID" -eq 0 ]
then
sudo bash "$BASH_SOURCE"
else
# Prepare
apt install -y wget unzip jq apt-transport-https curl
curl -fsSLo /usr/share/keyrings/brave-browser-beta-archive-keyring.gpg https://brave-browser-apt-beta.s3.brave.com/brave-browser-beta-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/brave-browser-beta-archive-keyring.gpg arch=amd64] https://brave-browser-apt-beta.s3.brave.com/ stable main" \
| sudo tee /etc/apt/sources.list.d/brave-browser-beta.list
# Install Brave Beta
apt update
apt install -y brave-browser-beta
# Add pre-installed extensions
sudo ln -s /opt/brave.com/brave/extensions /opt/brave.com/brave-beta/extensions
fi

View file

@ -1,50 +0,0 @@
#!/bin/bash
# Elevate script
if [ ! "$UID" -eq 0 ]
then
sudo bash "$BASH_SOURCE" "$USER"
else
# Download and extract `youtube-music-dl`
archiveName=$(sudo -u $1 mktemp)
sudo -u $1 wget https://github.com/dougppaz/youtube-music-dl/releases/download/v1.2.1/youtube-music-dl.zip -O $archiveName
extensionName=youtube-music-dl
contextRoot=$(sudo -u $1 mktemp -d)
extensionDir=$contextRoot/$extensionName
keyFile=$extensionDir.pem
extensionFile=$extensionDir.crx
manifestFile=$extensionDir/manifest.json
extensionRoot=/usr/share/brave-extensions
destination=$extensionRoot/$extensionName.crx
# Prepare extension
mkdir -p $extensionRoot
sudo -u $1 unzip $archiveName -d $extensionDir
sudo -u $1 brave-browser --pack-extension=$extensionDir
rm $archiveName
# Tamper manifest file
manifest="$(cat $manifestFile | jq ". + {key: "'"'"$(openssl rsa -in $keyFile -pubout -outform DER | openssl base64 -A)"'"'"}")"
manifest="$(echo $manifest | jq ".background.persistent = false")"
echo $manifest | sudo -u $1 tee $manifestFile
# Pack extension
extensionID=$(openssl rsa -in $keyFile -pubout -outform DER | sha256sum | head -c32 | tr 0-9a-f a-p)
extensionVersion=$(cat $manifestFile | jq -r '.version')
sudo -u $1 brave-browser --pack-extension=$extensionDir --pack-extension-key=$keyFile
# Install extension and preinstall it
cp $extensionFile $extensionRoot
configRoot=/opt/brave.com/brave/extensions/
rm -rf $contextRoot
chmod -R a+rx $extensionRoot
chmod -R u+w $extensionRoot
mkdir -p $configRoot
{
echo "{"
echo ' "external_crx": "'"$destination"'",'
echo ' "external_version": "'"$extensionVersion"'"'
echo "}"
} | tee $configRoot/$extensionID.json
fi

View file

@ -1,19 +0,0 @@
#!/bin/bash
# Elevate script
if [ ! "$UID" -eq 0 ]
then
sudo bash "$BASH_SOURCE"
else
# Prepare
apt install -y wget unzip jq apt-transport-https curl
curl -fsSLo /usr/share/keyrings/brave-browser-nightly-archive-keyring.gpg https://brave-browser-apt-nightly.s3.brave.com/brave-browser-nightly-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/brave-browser-nightly-archive-keyring.gpg arch=amd64] https://brave-browser-apt-nightly.s3.brave.com/ stable main" \
| sudo tee /etc/apt/sources.list.d/brave-browser-nightly.list
# Install Brave Nightly
apt update
apt install -y brave-browser-nightly
# Add pre-installed extensions
sudo ln -s /opt/brave.com/brave/extensions /opt/brave.com/brave-nightly/extensions
fi

View file

@ -1,16 +0,0 @@
#!/bin/bash
# Elevate script
if [ ! "$UID" -eq 0 ]
then
sudo bash "$BASH_SOURCE"
else
# Prepare
apt install -y wget unzip jq apt-transport-https curl
curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main" \
| tee /etc/apt/sources.list.d/brave-browser-release.list
# Install Brave
apt update
apt install -y brave-browser
fi

View file

@ -1,15 +0,0 @@
#!/bin/bash
# Elevate script
if [ ! "$UID" -eq 0 ]
then
sudo bash "$BASH_SOURCE"
else
wget https://dl-ssl.google.com/linux/linux_signing_key.pub -O /tmp/google.pub
gpg --no-default-keyring --keyring /etc/apt/keyrings/google-chrome.gpg --import /tmp/google.pub
echo 'deb [arch=amd64 signed-by=/etc/apt/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main' \
| sudo tee /etc/apt/sources.list.d/google-chrome.list
apt update
apt install -y google-chrome-stable
fi

View file

@ -1,22 +0,0 @@
#!/bin/bash
# Elevate script
if [ ! "$UID" -eq 0 ]
then
sudo bash "$BASH_SOURCE"
else
apt install -y wget gpg
keyFile=$(mktemp)
wget -qO- https://packages.microsoft.com/keys/microsoft.asc \
| gpg --dearmor > $keyFile
install -D -o root -g root -m 644 $keyFile /etc/apt/keyrings/packages.microsoft.gpg
echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" \
| tee /etc/apt/sources.list.d/vscode.list
rm -f $keyFile
apt update
apt install -y code
fi

View file

@ -1,16 +0,0 @@
#!/bin/bash
# Elevate script
if [ ! "$UID" -eq 0 ]
then
sudo bash "$BASH_SOURCE"
else
wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg \
| gpg --dearmor \
| dd of=/usr/share/keyrings/vscodium-archive-keyring.gpg
echo 'deb [ signed-by=/usr/share/keyrings/vscodium-archive-keyring.gpg ] https://download.vscodium.com/debs vscodium main' \
| tee /etc/apt/sources.list.d/vscodium.list
apt update
apt install -y codium
fi

View file

@ -1,34 +0,0 @@
#!/bin/bash
git config --global alias.ahfange init
git config --global alias.tuedezue add
git config --global alias.beschuldig blame
git config --global alias.zieh pull
git config --global alias.druck push
git config --global alias.machnah clone
git config --global alias.hol fetch
git config --global alias.zwiigab branch
git config --global alias.buechiih commit
git config --global alias.eich rebase
git config --global alias.erd rebase
git config --global alias.gahufwiifelde rebase
git config --global alias.vergliich diff
git config --global alias.tuezemme merge
git config --global alias.versorg stash
git config --global alias.markier tag
git config --global alias.pflueckoepfel cherry-pick
git config --global alias.pflueckhimbeeri cherry-pick
git config --global alias.buechuus checkout
git config --global alias.quaetsch 'merge --squash'
git config --global alias.pfudle 'push --force'
git config --global alias.beschuldigung blame
git config --global alias.zwiigli branch
git config --global alias.tagebuech log
git config --global alias.versteck stash
git config --global alias.zuestand status
git config --global alias.markierig tag
{
echo ""
echo "# Git auf Thurgauerisch"
echo "alias totsch='git'"
} >> ~/.bashrc

View file

@ -1,34 +0,0 @@
#!/bin/bash
commandName=gnome-shell-extension-installer
extensionLocation=/usr/share/gnome-shell/extensions
workingDirectory=$(pwd)
contextRoot=$(mktemp -d)
cd "$contextRoot"
sudo apt install -y jq
wget -O "$commandName" "https://github.com/brunelli/gnome-shell-extension-installer/raw/master/gnome-shell-extension-installer"
sudo install "$commandName" /usr/local/bin
cd "$workingDirectory"
rm -rf "$contextRoot"
for id in 779 4907 1162
do
workingDirectory=$(pwd)
contextRoot=$(mktemp -d)
unzipLocation=$(mktemp -d)
cd "$contextRoot"
gnome-shell-extension-installer $id --no-install
sudo gnome-shell-extension-installer $id --yes
unzip ./*.zip -d "$unzipLocation"
uuid=$(jq -r '.uuid' "$unzipLocation/metadata.json")
sudo chmod -R +r "$extensionLocation/$uuid"
gnome-extensions enable "$uuid"
cd "$workingDirectory"
rm -rf "$contextRoot"
done
killall -SIGQUIT gnome-shell

View file

@ -1,36 +0,0 @@
#!/bin/bash
# Elevate script
if [ ! "$UID" -eq 0 ]
then
sudo bash "$BASH_SOURCE" "$USER"
else
tempDir="$(mktemp -d)"
archiveName="$(mktemp)"
destination="/var/lib/godot"
if [ -d "$destination" ]; then
rm -rf "$destination"
fi
wget https://github.com/godotengine/godot/releases/download/3.5.1-stable/Godot_v3.5.1-stable_mono_x11_64.zip -O "$archiveName"
unzip "$archiveName" -d "$tempDir"
mkdir -p "$destination"
mv "$tempDir"/*/* "$destination"
wget https://github.com/godotengine/godot/raw/3.5.1-stable/icon.svg -O "$destination/icon.svg"
rm -rf "$tempDir"
rm -f "$archiveName"
exeFile="$(find "$destination" -maxdepth 1 -perm -111 -type f)"
ln -s "$exeFile" /usr/local/bin/godot
{
echo "[Desktop Entry]"
echo "Encoding=UTF-8"
echo "Type=Application"
echo "Terminal=false"
echo "Exec=$exeFile"
echo "Name=Godot Engine"
echo "Icon=$destination/icon.svg"
} > /usr/share/applications/godot.desktop
fi

View file

@ -1,21 +0,0 @@
#!/bin/bash
# Elevate script
if [ ! "$UID" -eq 0 ]
then
sudo bash "$BASH_SOURCE"
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install gradle 7.5.1
else
apt install -y wget apt-transport-https
mkdir -p /etc/apt/keyrings
wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public \
| tee /etc/apt/keyrings/adoptium.asc
echo "deb [signed-by=/etc/apt/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" \
| tee /etc/apt/sources.list.d/adoptium.list
apt update
apt install -y temurin-17-jdk
fi

View file

@ -1,25 +0,0 @@
#!/bin/bash
# Elevate script
if [ ! "$UID" -eq 0 ]
then
sudo bash "$BASH_SOURCE"
else
workingDirectory=$(pwd)
contextRoot=$(mktemp -d)
cd $contextRoot
curl -fsSL https://raw.githubusercontent.com/nagygergo/jetbrains-toolbox-install/1.1/jetbrains-toolbox.sh \
| bash
cd $workingDirectory
rm -rf $contextRoot
{
echo "[Desktop Entry]"
echo "Encoding=UTF-8"
echo "Type=Application"
echo "Terminal=false"
echo "Exec=/opt/jetbrains-toolbox/jetbrains-toolbox"
echo "Name=JetBrains Toolbox"
} > /usr/share/applications/jetbrains-toolbox.desktop
fi

View file

@ -1,19 +0,0 @@
#!/bin/bash
# Elevate script
if [ ! "$UID" -eq 0 ]
then
sudo bash "$BASH_SOURCE" "$USER"
else
package=$(mktemp)
wget https://github.com/Yash-Handa/logo-ls/releases/download/v1.3.7/logo-ls_amd64.deb -O $package
dpkg -i $package
rm -f $package
homeDir=$(sudo -u $1 bash -c 'realpath ~')
{
echo "alias ls='logo-ls -D'"
echo "alias ll='ls -al'"
echo "alias l='ls'"
} | sudo -u $1 tee -a $homeDir/.bashrc
fi

View file

@ -1,4 +0,0 @@
#!/bin/bash
export NVS_HOME="$HOME/.nvs"
git clone https://github.com/jasongin/nvs "$NVS_HOME"
. "$NVS_HOME/nvs.sh" install

View file

@ -1,25 +0,0 @@
#!/bin/bash
# Elevate script
if [ ! "$UID" -eq 0 ]
then
sudo bash "$BASH_SOURCE" "$USER"
else
bin=oh-my-posh
workingDirectory=$(pwd)
contextRoot=$(mktemp -d)
cd $contextRoot
wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -O $bin
install $bin /usr/local/bin
cd $workingDirectory
rm -rf $contextRoot
homeDir=$(sudo -u $1 bash -c 'realpath ~')
sudo -u $1 mkdir -p $homeDir/.omp
sudo -u $1 cp $homeDir/Nextcloud/.omp/manuel.omp.json $homeDir/.omp/manuel.omp.json
echo 'eval "$(oh-my-posh init bash --config ~/.omp/manuel.omp.json)"' \
| sudo -u $1 tee -a $homeDir/.bashrc
fi

View file

@ -1,10 +0,0 @@
#!/bin/bash
curl https://pyenv.run | bash
{
echo ""
echo "# pyenv"
echo 'export PYENV_ROOT="$HOME/.pyenv"'
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"'
echo 'eval "$(pyenv init -)"'
echo 'eval "$(pyenv virtualenv-init -)"'
} >> ~/.bashrc

View file

@ -1,9 +0,0 @@
#!/bin/bash
# Elevate script
if [ ! "$UID" -eq 0 ]
then
sudo bash "$BASH_SOURCE"
else
apt install -y python3 python-is-python3 python3-pip
pip install pipenv
fi

View file

@ -1,13 +0,0 @@
#!/bin/bash
# Elevate script
if [ ! "$UID" -eq 0 ]
then
sudo bash "$BASH_SOURCE"
else
package=$(mktemp)
wget https://github.com/rclone/rclone/releases/download/v1.60.0/rclone-v1.60.0-linux-amd64.deb -O $package
dpkg -i $package
rm -f $package
cp ${BASH_SOURCE%/*}/rclone@.service /etc/systemd/user
fi

View file

@ -1,24 +0,0 @@
[Unit]
Description=rclone: Remote FUSE filesystem for cloud storage config %i
Documentation=man:rclone(1)
After=network-online.target
Wants=network-online.target
[Service]
Type=notify
Environment="EXPRESSION=%i"
ExecStart= \
bash -c ' \
target="${EXPRESSION%%":"*}"; \
dirname="${EXPRESSION#*":"}"; \
mkdir -p "%h/$dirname"; \
mkdir -p /tmp/rclone; \
/usr/bin/rclone mount \
--config=%h/.config/rclone/rclone.conf \
--vfs-cache-mode full \
--log-file /tmp/rclone/$target.log \
$target: "%h/$dirname"'
ExecStop=bash -c '/bin/fusermount -zu "%h/${EXPRESSION#*":"}"'
[Install]
WantedBy=default.target

View file

@ -1,16 +0,0 @@
#!/bin/bash
# Elevate script
if [ ! "$UID" -eq 0 ]
then
sudo bash "$BASH_SOURCE"
else
workingDirectory=$(pwd)
contextRoot=$(mktemp -d)
cd $contextRoot
wget https://dl.gitea.io/tea/0.9.0/tea-0.9.0-linux-amd64 -O tea
install tea /usr/local/bin
cd $workingDirectory
rm -rf $contextRoot
fi

View file

@ -1,2 +0,0 @@
#!/bin/bash
sudo apt install -y swtpm swtpm-tools libvirt-daemon-system virt-manager

View file

@ -1,24 +0,0 @@
#!/bin/bash
# Elevate script
if [ ! "$UID" -eq 0 ]
then
sudo bash "$BASH_SOURCE"
else
workingDirectory=$(pwd)
contextRoot=$(mktemp -d)
cd $contextRoot
# Preview from docker container
# container_id="$(docker create woodpeckerci/woodpecker-cli:next)"
# docker cp $container_id:/bin/woodpecker-cli /usr/local/bin/woodpecker-cli
# Latest from GitHub
wget https://github.com/woodpecker-ci/woodpecker/releases/download/v0.15.5/woodpecker-cli_linux_amd64.tar.gz \
-O woodpecker-cli.tar.gz
tar -xvzf woodpecker-cli.tar.gz
install woodpecker-cli /usr/local/bin
cd $workingDirectory
rm -rf $contextRoot
fi

View file

@ -1,32 +0,0 @@
#!/bin/bash
# Elevate script
if [ ! "$UID" -eq 0 ]
then
sudo bash "$BASH_SOURCE" "$USER"
else
apt install -y p7zip-full libgumbo-dev libfuse-dev libssl-dev libcurl4-openssl-dev uuid-dev;
workingDirectory="$(pwd)";
tempDir="$(mktemp -d)";
cd $tempDir;
git clone https://github.com/fangfufu/httpdirfs.git;
pushd httpdirfs;
make;
install -m 755 -D httpdirfs /usr/local/bin/httpdirfs;
popd;
git clone https://aur.archlinux.org/ttf-ms-win11-auto.git ttf-win11;
cd ttf-win11;
source ./PKGBUILD;
prepare;
package_ttf-ms-win11-auto;
rm -f /usr/local/bin/httpdirfs;
cd $tempDir;
wget -O CascadiaCode.zip https://github.com/microsoft/cascadia-code/releases/download/v2111.01/CascadiaCode-2111.01.zip
unzip -d . CascadiaCode.zip;
cp ttf/* /usr/share/fonts/TTF;
cd $workingDirectory;
fi