diff --git a/lib/eval-module.nix b/lib/eval-module.nix deleted file mode 100644 index 61c9abd1..00000000 --- a/lib/eval-module.nix +++ /dev/null @@ -1,16 +0,0 @@ -let - inherit (nixpkgs) lib; - nixpkgs = import { config = {}; overlay = []; }; - file = (builtins.getEnv "FILE"); - property = (builtins.getEnv "PROPERTY"); - processor = if (builtins.stringLength property > 0) - then - (_: lib.attrsets.getAttrFromPath (lib.strings.splitString "." property) _) - else - (_: _); -in - processor (lib.evalModules { - modules = [ - (import file) - ]; - }).config diff --git a/profiles/machines/manuel/DerGeret/Arch/install.fish b/profiles/machines/manuel/DerGeret/Arch/install.fish deleted file mode 100755 index f94a3448..00000000 --- a/profiles/machines/manuel/DerGeret/Arch/install.fish +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/env fish -begin - bash "$(status dirname)/install.sh" -end diff --git a/profiles/machines/manuel/DerGeret/Arch/install.sh b/profiles/machines/manuel/DerGeret/Arch/install.sh deleted file mode 100755 index e6a4e54a..00000000 --- a/profiles/machines/manuel/DerGeret/Arch/install.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -e -function install() { - function installDrivers() { - . "../../../../../scripts/Arch/Config/SecureBoot/install.sh"; - . "../../../../../scripts/Arch/Software/nvidia-dkms/install.sh"; - . "../../../../../scripts/Arch/Software/xone/install.sh"; - . "../../../../../scripts/Arch/Software/bt-dualboot/install.sh"; - } - - function initializeConfig() { - . "../../../../../scripts/Unix/Devices/Logitech G903/install.sh"; - } - - pushd "$dir" > /dev/null; - . "../../../../../scripts/Arch/OS/install.sh"; - popd > /dev/null; -} - -install; diff --git a/profiles/machines/manuel/DerGeret/Arch/setup.fish b/profiles/machines/manuel/DerGeret/Arch/setup.fish deleted file mode 100755 index 7a60e020..00000000 --- a/profiles/machines/manuel/DerGeret/Arch/setup.fish +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/env fish -begin - set -l dir (status dirname) - - CONFIG_NAME="DerGeret" \ - ARCH_HOSTNAME="der-geret" \ - USER_DISPLAYNAME="Manuel Thalmann" \ - source "$(status dirname)/../../../../../scripts/Arch/OS/setup.fish" -end diff --git a/profiles/machines/manuel/DerGeret/Arch/setup.sh b/profiles/machines/manuel/DerGeret/Arch/setup.sh deleted file mode 100755 index 9d201db7..00000000 --- a/profiles/machines/manuel/DerGeret/Arch/setup.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -e -pushd "${BASH_SOURCE%/*}" > /dev/null; - -CONFIG_MODULE="./config.nix" \ -ARCH_HOSTNAME="der-geret" \ -USER_DISPLAYNAME="Manuel Thalmann" \ - . "../../../../../scripts/Arch/OS/setup.sh"; - -popd > /dev/null; diff --git a/profiles/machines/manuel/DerGeret/Windows/Backup.ps1 b/profiles/machines/manuel/DerGeret/Windows/Backup.ps1 deleted file mode 100644 index 03e2bc68..00000000 --- a/profiles/machines/manuel/DerGeret/Windows/Backup.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/pwsh -$null = New-Module { - . "$PSScriptRoot/../../../../../scripts/Common/Scripts/Context.ps1"; - . "$PSScriptRoot/../../../../../scripts/Windows/OS/Legacy.ps1"; - - Write-Host "Starting Backup of Windows"; - $context = [Context]::new(); - $context.BackupName = $env:BACKUP_NAME ?? $(Read-Host -Prompt "Please enter a backup name"); - Backup-WindowsInstallation $context; -} diff --git a/profiles/machines/manuel/DerGeret/Windows/Drivers.ps1 b/profiles/machines/manuel/DerGeret/Windows/Drivers.ps1 deleted file mode 100644 index f9bb853c..00000000 --- a/profiles/machines/manuel/DerGeret/Windows/Drivers.ps1 +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../../../../../scripts/Common/Scripts/Context.ps1"; - -function Install-PortValhallaDrivers { - param( - [Context] $context - ) - - $winPath = "$PSScriptRoot/../../../../../scripts/Windows"; - $driverPath = "$winPath/Drivers"; - $mbDriverPath = "$driverPath/ROG Zenith Extreme Alpha"; - $context.RegisterReboot(); - - . "$winPath/Software/" - . "$mbDriverPath/MarvellEthernet/Install.ps1" $context; - . "$mbDriverPath/IntelWiFi/Install.ps1" $context; - . "$mbDriverPath/AMDChipsetX399/Install.ps1" $context; - . "$driverPath/Predator Z301C/Install.ps1" $context; - . "$mbDriverPath/IntelBluetooth/Install.ps1" $context; - . "$driverPath/AMDChipsetX399/Install.ps1" $context; - . "$driverPath/Tobii EyeX/Install.ps1" $context; - - choco install -y --ignore-checksums ` - amd-ryzen-master; - - choco install -y geforce-game-ready-driver icue wavelink; - $context.RemoveDesktopIcon("*Wave Link*"); - $context.RemoveDesktopIcon("*GeForce*"); - - Write-Information "Set AMD Ryzen power plan as default"; - $ryzenPlan = [regex]::Match(((powercfg /LIST) | Where-Object { $_ -like "*(AMD Ryzen*"; }), "Power Scheme GUID: ([0-9a-f-]+) ").Groups[1]; - powercfg /S $ryzenPlan; - $context.PreventSleepMode(); -} - -function Install-PersonalDrivers { - param( - [Context] $context - ) - - $softwarePath = "$PSScriptRoot/../../../../../scripts/Windows/Software"; - . "$softwarePath/TobiiGhost/Install.ps1" $context; - . "$softwarePath/TobiiGameHub/Install.ps1" $context; -} diff --git a/profiles/machines/manuel/DerGeret/Windows/Restore.ps1 b/profiles/machines/manuel/DerGeret/Windows/Restore.ps1 deleted file mode 100644 index d0bf1b45..00000000 --- a/profiles/machines/manuel/DerGeret/Windows/Restore.ps1 +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/Drivers.ps1"; -. "$PSScriptRoot/../../../../../scripts/Common/Scripts/Context.ps1"; -. "$PSScriptRoot/../../../../../scripts/Windows/Collections/Personal.ps1" -. "$PSScriptRoot/../../../../../scripts/Windows/OS/Manage.ps1"; - -function Initialize-Configuration { - # Fix synchronization between Linux and Windows clock - Set-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" -Name "RealTimeIsUniversal" -Value 1 -Type "DWord"; - - # Force time resynchronization - $service = Get-Service W32Time; - $stopped = ($service.Status -eq "Stopped"); - Start-Service $service; - w32tm /resync /force; - - if ($stopped) { - Stop-Service $service; - } -} - -function Restore-Apps { - param([Context] $context) - Restore-PersonalApps $context; -} - -Write-Host "Starting Restoration of Windows"; -[Context]$context = [Context]::new(); -Start-WindowsInstallation; diff --git a/profiles/machines/manuel/DerGeret/Windows/Setup.ps1 b/profiles/machines/manuel/DerGeret/Windows/Setup.ps1 deleted file mode 100644 index 56e7d85e..00000000 --- a/profiles/machines/manuel/DerGeret/Windows/Setup.ps1 +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/pwsh -$env:WIN_COMPUTER_NAME = "DerGeret"; -$env:CONFIG_NAME = $env:WIN_COMPUTER_NAME; - -. "$PSScriptRoot/../../../../../scripts/Windows/OS/Setup.ps1"; diff --git a/profiles/machines/manuel/Generic/Arch/install.sh b/profiles/machines/manuel/Generic/Arch/install.sh deleted file mode 100755 index d4f5f90a..00000000 --- a/profiles/machines/manuel/Generic/Arch/install.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -e -function install() { - local dir="$(realpath "${BASH_SOURCE%/*}")"; - - function installDrivers() { - . "$dir/../../../../../scripts/Arch/Config/SecureBoot/install.sh"; - } - - - . "../../../../../scripts/Arch/OS/install.sh"; -} - -install; diff --git a/profiles/machines/manuel/Generic/Arch/setup.sh b/profiles/machines/manuel/Generic/Arch/setup.sh deleted file mode 100755 index e1a37b4c..00000000 --- a/profiles/machines/manuel/Generic/Arch/setup.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -e -pushd "${BASH_SOURCE%/*}" > /dev/null; - -ARCH_MOUNT_ROOT="/mnt" \ -ARCH_HOSTNAME="archlinux" \ -USER_DISPLAYNAME="Manuel Thalmann" \ - . "../../../../../scripts/Arch/OS/setup.sh"; - -popd > /dev/null; diff --git a/profiles/machines/manuel/Generic/Windows/Install.ps1 b/profiles/machines/manuel/Generic/Windows/Install.ps1 deleted file mode 100644 index b4d0557e..00000000 --- a/profiles/machines/manuel/Generic/Windows/Install.ps1 +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../../../../../scripts/Common/Scripts/Context.ps1"; -. "$PSScriptRoot/../../../../../scripts/Windows/OS/Manage.ps1"; -. "$PSScriptRoot/../../../../../scripts/Windows/Collections/Generic.ps1" - -function Restore-Apps { - param([Context] $context) - Restore-GenericApps $context; -} - -[Context]$context = [Context]::new(); -Invoke-WindowsInstallation $context; -Restart-Computer -Force; diff --git a/profiles/machines/manuel/Generic/Windows/Setup.ps1 b/profiles/machines/manuel/Generic/Windows/Setup.ps1 deleted file mode 100644 index eaf220f0..00000000 --- a/profiles/machines/manuel/Generic/Windows/Setup.ps1 +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/pwsh -$env:WIN_COMPUTER_NAME ??= "win11"; -$env:CONFIG_MODULE ??= "$PSScriptRoot/../config.nix"; - -. "$PSScriptRoot/../../../../../scripts/Windows/OS/Setup.ps1"; diff --git a/profiles/machines/manuel/KVM/Windows/Install.ps1 b/profiles/machines/manuel/KVM/Windows/Install.ps1 deleted file mode 100644 index 1277f112..00000000 --- a/profiles/machines/manuel/KVM/Windows/Install.ps1 +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/pwsh -function Initialize-Configuration { - # Hide update which prevents use of WSL in KVM - Get-WindowsUpdate -KBArticleID KB5032190 -Hide -AcceptAll; - Get-WindowsUpdate -KBArticleID KB5032190 -Hide -AcceptAll; -} - -function Install-PortValhallaDrivers { - param( - [Context] $context - ) - - choco install -y --params "'ALLUSERS=1'" qemu-guest-agent; - choco install -y spice-agent; -} - -. "$PSScriptRoot/../../../../Generic/Windows/Install.ps1"; diff --git a/profiles/machines/manuel/KVM/Windows/Setup.ps1 b/profiles/machines/manuel/KVM/Windows/Setup.ps1 deleted file mode 100644 index fac997bd..00000000 --- a/profiles/machines/manuel/KVM/Windows/Setup.ps1 +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../../../../Generic/Windows/Setup.ps1"; diff --git a/profiles/machines/manuel/ManuSurface/Arch/install.fish b/profiles/machines/manuel/ManuSurface/Arch/install.fish deleted file mode 100755 index 287a21af..00000000 --- a/profiles/machines/manuel/ManuSurface/Arch/install.fish +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/env fish -begin - set -l dir (status dirname) - source "$dir/../../../../../scripts/Arch/OS/install.fish" -end diff --git a/profiles/machines/manuel/ManuSurface/Arch/install.sh b/profiles/machines/manuel/ManuSurface/Arch/install.sh deleted file mode 100755 index ca043e3b..00000000 --- a/profiles/machines/manuel/ManuSurface/Arch/install.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -e -function install() { - function installDrivers() { - . "../../../../../scripts/Arch/Config/SecureBoot/install.sh"; - . "../../../../../scripts/Arch/Drivers/SurfaceBook2/install.sh"; - } - - function installSoftware() { - . "../../../../../scripts/Arch/Collections/school.sh"; - } - - function initializeConfig() { - . "../../../../../scripts/Common/Config/Steam/hidpi.sh"; - . "../../../../../scripts/Unix/Devices/Surface Book 2/install.sh"; - . "../../../../../scripts/Unix/Devices/Logitech G903/install.sh"; - - # Because, as it looks, Surface Books are fucking stupid. - . "../../../../../scripts/Common/Config/GRUB/verbose.sh"; - } - - pushd "${BASH_SOURCE%/*}" > /dev/null; - . "../../../../../scripts/Arch/OS/install.sh"; - popd > /dev/null; -} - -install; diff --git a/profiles/machines/manuel/ManuSurface/Arch/setup.fish b/profiles/machines/manuel/ManuSurface/Arch/setup.fish deleted file mode 100755 index 0fee01e0..00000000 --- a/profiles/machines/manuel/ManuSurface/Arch/setup.fish +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/env fish -begin - set -l dir (status dirname) - - function installDrivers -V dir -S - source "$dir/../../../../../scripts/Common/Scripts/config.fish" - pacstrap -K (getConfig valhalla.partition.rootDir) linux-firmware-marvell; - end - - function getInstallerScript -V dir -S - echo "$dir/install.fish" - end - - CONFIG_NAME="ManuSurface" \ - ARCH_HOSTNAME="manu-surface" \ - USER_DISPLAYNAME="Manuel Thalmann" \ - source "$(status dirname)/../../../../../scripts/Arch/OS/setup.fish"; -end diff --git a/profiles/machines/manuel/ManuSurface/PopOS/setup.sh b/profiles/machines/manuel/ManuSurface/PopOS/setup.sh deleted file mode 100755 index 4016c23f..00000000 --- a/profiles/machines/manuel/ManuSurface/PopOS/setup.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; -# Set Hostname -sudo hostnamectl set-hostname ManuSurface; - -source "../../../../../scripts/PopOS/Scripts/preinstall.sh"; -source "../../../../../scripts/PopOS/OS/install.sh"; -source "../../../../../scripts/Debian/Drivers/SurfaceBook2/Setup/install.sh"; -source "../../../../../scripts/PopOS/Software/Collections/school.sh"; -INSTALL_FONTS=1 NEXTCLOUD_DIR="${NEXTCLOUD_DIR}" source "../../../../../scripts/Common/Config/UserProfile/install.sh"; - -# Install equalizer -source "../../../../../scripts/Common/Config/EasyEffects/SurfaceBook2/install.sh"; - -source "../../../../../scripts/PopOS/Scripts/postinstall.sh"; -popd > /dev/null; diff --git a/profiles/machines/manuel/PopOSLive/setup.sh b/profiles/machines/manuel/PopOSLive/setup.sh deleted file mode 100755 index 7b941c59..00000000 --- a/profiles/machines/manuel/PopOSLive/setup.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; - -# Set Hostname -sudo hostnamectl set-hostname ManuPopOSLive; -source "../../../../scripts/PopOS/Scripts/prepare.sh"; -source "../../../../scripts/PopOS/OS/install.sh"; -source "../../../../scripts/PopOS/Software/Collections/personal.sh"; -INSTALL_FONTS=1 NEXTCLOUD_DIR="${NEXTCLOUD_DIR}" source "../../../../scripts/Common/Config/UserProfile/personal.sh"; - -source "../../../../scripts/PopOS/Scripts/postinstall.sh"; -popd > /dev/null; diff --git a/scripts/Arch/Collections/personal.sh b/scripts/Arch/Collections/personal.sh deleted file mode 100755 index 457f9fb6..00000000 --- a/scripts/Arch/Collections/personal.sh +++ /dev/null @@ -1,268 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; - -# Firmware -yay --noconfirm -Syu mkinitcpio-firmware; - -# Essentials -yay --noconfirm -Syu \ - neofetch \ - tldr \ - bash-completion \ - wget \ - oh-my-posh-bin \ - screen \ - tmux \ - htop \ - btop \ - nvtop \ - numbat-bin \ - lsof \ - zsh \ - fish \ - powershell-bin \ - pkgfile \ - zoxide \ - fzf \ - sl \ - terminal-parrot \ - rar \ - ; - -sudo pkgfile --update; - -. "../Software/openssh/install.sh"; -. "../Software/vim/install.sh"; -. "../Software/git/install.sh"; -. "../Software/aliae/install.sh"; -. "../../Common/Config/zoxide/install.sh"; - -sudo chsh $USER --shell "$(which fish)"; - -# User Interface -. ../Software/KDE/install.sh; -. ../Software/sddm/install.sh; - -yay --noconfirm -Syu \ - maliit-keyboard \ - ; - -yay --noconfirm -Syu power-profiles-daemon; -sudo systemctl enable --now power-profiles-daemon; - -# GUI Applications -yay --noconfirm -Syu \ - dconf-editor \ - flatpak \ - `# Fixes: https://www.reddit.com/r/flatpak/comments/168tav2/how_to_fix_blurry_flatpaks_on_high_resolution/` \ - xdg-desktop-portal-gtk \ - ; - -# Networking -yay --noconfirm -Syu \ - networkmanager-openvpn \ - networkmanager-openconnect \ - ; - -# Fonts -yay --noconfirm -Syu \ - ttf-cascadia-code-nerd \ - ttf-ms-win11-auto \ - otf-cascadia-code \ - ttf-droid \ - ; - -# GRUB Shenanigans -. "../Software/minegrub-theme/install.sh"; - -# # Gnome Extensions -# yay --noconfirm -Syu \ -# gnome-shell-extension-order-icons-git \ -# gnome-shell-extension-desktop-icons-ng \ -# gnome-shell-extension-dash-to-dock \ -# gnome-shell-extension-pop-shell-git \ -# gnome-shell-extension-pano-git; - -# . "../Config/GnomeExtensions/install.sh"; - -# Frameworks -. "../Software/IcedTea/install.sh"; - -# File Sync -yay --noconfirm -Syu nextcloud-client; -. "../Software/rclone/install.sh"; - -# Firefox -. "../Software/Firefox/install.sh"; - -# Brave Browser -yay --noconfirm -Syu \ - brave-bin \ - `# brave-beta-bin` \ - `# brave-nightly-bin` \ - ; - -braveExtensions="/opt/brave-bin/extensions"; - -yay --noconfirm -Syu jq; - -BROWSER_BIN="brave" \ -EXTENSION_DIR="/usr/share/chromium-extensions" \ -EXTENSION_POLICY_DIR="$braveExtensions" \ - source "../../Common/Software/Chromium/ytmdl.sh"; - -# sudo ln -sf "$braveExtensions" /opt/brave.com/brave-beta/extensions; -# sudo ln -sf "$braveExtensions" /opt/brave.com/brave-nightly/extensions; - -# Pennywise -source "../Software/Pennywise/install.sh"; - -# Tools -yay --noconfirm -Rs typescript || true; -yay --noconfirm -Rs yarn || true; -yay --noconfirm -Rs nodejs || true; - -yay --noconfirm -Syu \ - bitwarden \ - keepass \ - keepassxc \ - signal-desktop \ - threema-desktop \ - `# extension-manager` \ - `# easyeffects` \ - `# gnome-tweaks` \ - anki-bin \ - cpu-x \ - libreoffice-fresh \ - gnome-calculator \ - pdfarranger \ - img2pdf \ - protonvpn \ - yubikey-manager-qt \ - ; - -yay --noconfirm -Syu \ - discord \ - openasar-git \ - ; - -yay --noconfirm -Syu \ - blackbox-terminal \ - || \ - sudo flatpak install --system -y \ - com.raggesilver.BlackBox \ - ; - -yay --noconfirm -Syu \ - mupdf-tools \ - naps2-bin \ - protonmail-bridge \ - thunderbird \ - ; - -. "../Software/waydroid/install.sh"; -. "../../Common/Software/nuke-usb/install.sh"; - -# Python -yay --noconfirm -Syu \ - python \ - python-pip \ - pyenv \ - python-pipenv; - -. "../../Common/Config/pyenv/install.sh"; - -# Media -. "../Software/ytmdesktop/install.sh"; - -yay --noconfirm -Syu \ - gimp \ - inkscape \ - `# netflix` \ - spotube-bin \ - stremio \ - `# idal-dl` \ - tidal-hifi-bin \ - nuclear-player-bin \ - audius-client-bin \ - ; - -yay --noconfirm -Syu \ - tidal-dl \ - netflix \ - | true; - -# Games -yay --noconfirm -Syu \ - steam \ - chiaki \ - osu-lazer-bin \ - libretro \ - supertux \ - gamepad-tool-bin \ - ; - -. "../Software/Lutris/install.sh"; - -# Coding -yay --noconfirm -Syu \ - archiso \ - `# ISO support for wimlib` \ - cdrkit \ - wimlib \ - devdocs-desktop \ - python-docutils \ - esbonio \ - godot-mono-bin \ - `# Trash functionality for code` \ - gvfs \ - vscodium-bin \ - visual-studio-code-bin \ - ; - -. "../../Common/Config/vscode/install.sh"; - -{ - echo "--touch-events"; -} | tee ~/.config/codium-flags.conf > /dev/null; - -cp ~/.config/codium-flags.conf ~/.config/code-flags.conf; - -# Node.js -yay --noconfirm -Syu nodejs-n; -sudo n install latest; - -# Docker -. "../Software/docker/install.sh"; - -# Nix -yay --noconfirm -Syu \ - nix \ - nil-git \ - ; - -sudo nix-channel --add https://nixos.org/channels/nixpkgs-unstable; -sudo nix-channel --update; - -# Misc -. "../Software/logo-ls/install.sh"; -. "../Software/Virtual Machine Manager/install.sh"; - -yay --noconfirm -Syu \ - bb \ - tea \ - woodpecker-cli \ - `# RDP support for Remmina` \ - freerdp \ - remmina \ - wireshark-qt \ - linux-wifi-hotspot \ - pdf2svg \ - tnef \ - propertree-git \ - android-tools \ - ; - -flatpak install -y flathub com.usebottles.bottles; - -popd > /dev/null; diff --git a/scripts/Arch/Collections/school.sh b/scripts/Arch/Collections/school.sh deleted file mode 100755 index 1b399b7a..00000000 --- a/scripts/Arch/Collections/school.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; - -. "./personal.sh"; - -# Communication -yay --noconfirm -Syu \ - teams-for-linux-bin \ - ; - -# Java -yay --noconfirm -Syu \ - jdk17-temurin \ - gradle \ - jetbrains-toolbox \ - ; - -# Note Taking -yay --noconfirm -Syu \ - xournalpp-git \ - rnote \ - ; - -# Latex -yay --noconfirm -Syu \ - texlive \ - texlive-langgerman \ - ; - -. "../../Common/Config/udev/ct-board.sh"; - -popd > /dev/null; diff --git a/scripts/Arch/Config/GnomeExtensions/install.sh b/scripts/Arch/Config/GnomeExtensions/install.sh deleted file mode 100755 index 231acbfa..00000000 --- a/scripts/Arch/Config/GnomeExtensions/install.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; - -. "../../Software/gnome-shell-extension-installer/install.sh"; -. "../../../Common/Config/GnomeExtensions/install-extension.sh"; -yay --noconfirm -Syu jq; - -extensions=( - 4907 # EasyEffects Preset Selector https://extensions.gnome.org/extension/4907/easyeffects-preset-selector/ - 1162 # Emoji Selector https://extensions.gnome.org/extension/1162/emoji-selector/ -); - -installExtension extensions; - -popd > /dev/null; diff --git a/scripts/Arch/Config/SecureBoot/install.sh b/scripts/Arch/Config/SecureBoot/install.sh deleted file mode 100755 index 16403125..00000000 --- a/scripts/Arch/Config/SecureBoot/install.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -EFI_BOOT_DIR="${EFI_BOOT_DIR:-"/boot"}"; -BOOTLOADER_ID=${BOOTLOADER_ID:-"Arch"}; -bootNums="$(efibootmgr | sed "/$BOOTLOADER_ID/{ s/^.*Boot\([[:digit:]]\+\)\*.*$/\1/; p; }; d")"; - -yay --noconfirm -Syu secureboot-grub; - -for bootNum in $bootNums; -do - sudo efibootmgr --delete-bootnum --bootnum "$bootNum" -done; - -sudo sed -i \ - -e "/esp=/{" \ - -e "a esp=\"$EFI_BOOT_DIR\"" \ - -e "d" \ - -e "}" \ - -e "/bootloader_id=/{" \ - -e "a bootloader_id=\"$BOOTLOADER_ID\"" \ - -e "d" \ - -e "}" \ - /etc/secureboot.conf; - -sudo secure-grub-install; diff --git a/scripts/Arch/Config/base-devel/install.sh b/scripts/Arch/Config/base-devel/install.sh deleted file mode 100755 index ba2e41fd..00000000 --- a/scripts/Arch/Config/base-devel/install.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -# Bacause of: https://www.reddit.com/r/archlinux/s/KTx9AbsFfT -pushd "${BASH_SOURCE%/*}" > /dev/null; - -configFile="/etc/makepkg.conf"; -customFile="$configFile.d/makepkg.conf"; -pattern="^\\(OPTIONS=(.*[( ]\\)\\(debug[ )].*)\\)$"; - -if [ ! -f "$customFile" ]; -then - sed "/$pattern/{ s/$pattern/\\1!\\2/; p; }; d" "$configFile" | sudo tee "$customFile" > /dev/null; - echo "MAKEFLAGS=\"-j\$(nproc)\"" | sudo tee --append "$customFile" > /dev/null; -fi; - -popd > /dev/null; diff --git a/scripts/Arch/Config/nvidia-dkms/install.sh b/scripts/Arch/Config/nvidia-dkms/install.sh deleted file mode 100755 index b23eb8f2..00000000 --- a/scripts/Arch/Config/nvidia-dkms/install.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; - -echo "MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)" | sudo tee /etc/mkinitcpio.conf.d/nvidia.conf > /dev/null; - -sudo sed -i \ - -e "/^HOOKS=(.* kms /{" \ - -e "h; s/^/#/; p;" \ - -e "g; s/ kms / /" \ - -e "}" \ - /etc/mkinitcpio.conf; - -sudo mkinitcpio -P; - -. "../../../Common/Config/nvidia-dkms/install.sh"; - -popd > /dev/null; diff --git a/scripts/Arch/Config/openssh/install.sh b/scripts/Arch/Config/openssh/install.sh deleted file mode 100755 index 0742809a..00000000 --- a/scripts/Arch/Config/openssh/install.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -systemctl --user enable --now ssh-agent; - -{ - echo "#!/bin/bash"; - echo "export SSH_AUTH_SOCK=\"\$XDG_RUNTIME_DIR/ssh-agent.socket\""; -} | sudo tee "/etc/profile.d/openssh.sh" > /dev/null; diff --git a/scripts/Arch/Config/pacman/install.sh b/scripts/Arch/Config/pacman/install.sh deleted file mode 100755 index 13b6d804..00000000 --- a/scripts/Arch/Config/pacman/install.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -sudo sed -i \ - -e "/^\[options\]$/,/^\[/{" \ - -e "s/^#\?\(Color\)$/\1/;" \ - -e "/^# Misc options$/{" \ - `# -e "a ILoveCandy"` \ - -e "};" \ - -e "}" \ - -e "/^#\?\[multilib\]$/,/^$/{ s/^#\?\(.*\)$/\1/; }" \ - /etc/pacman.conf; - -sudo pacman -Sy; diff --git a/scripts/Arch/Config/sddm/install.sh b/scripts/Arch/Config/sddm/install.sh deleted file mode 100755 index 1b479b5d..00000000 --- a/scripts/Arch/Config/sddm/install.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -configDir="/etc/sddm.conf.d"; -sudo systemctl enable sddm; - -sudo mkdir -p "$configDir"; - -{ - echo "[General]"; - echo "DisplayServer=wayland"; - echo "GreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell"; - echo ""; - echo "[Wayland]"; - echo "CompositorCommand=kwin_wayland --drm --no-lockscreen --no-global-shortcuts --locale1 --inputmethod maliit-keyboard"; -} | sudo tee "$configDir/10-wayland.conf" > /dev/null; diff --git a/scripts/Arch/Config/sudo/install.sh b/scripts/Arch/Config/sudo/install.sh deleted file mode 100755 index 578e1f5b..00000000 --- a/scripts/Arch/Config/sudo/install.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -if [ ! "$UID" -eq 0 ] -then - sudo bash "$BASH_SOURCE"; -else - wheelPattern="^# \(%wheel \)"; - sed -i "/$wheelPattern/{ /NOPASSWD/{ b; }; s/$wheelPattern/\1/; }" /etc/sudoers; -fi; diff --git a/scripts/Arch/Drivers/Surface/camera.sh b/scripts/Arch/Drivers/Surface/camera.sh deleted file mode 100755 index a94db38e..00000000 --- a/scripts/Arch/Drivers/Surface/camera.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -contextRoot="$(mktemp -d)"; -packageName="libcamera-git"; - -pushd "$contextRoot" > /dev/null; - -yay -G "$packageName"; -cd *; -yay --noconfirm -S "$packageName" --asdeps || true; - -sed -i \ - -e "s/^\(provides=(.*\)\()\)/\1 \"libcamera-base.so\" \"libcamera.so\"\2/" \ - -e "s/^\(conflicts=(.*\)\()\)/\1 \"libcamera-ipa\"\2/" \ - PKGBUILD; - -yes | makepkg -si; - -popd > /dev/null; - -rm -rf "$contextRoot"; diff --git a/scripts/Arch/Drivers/Surface/install.sh b/scripts/Arch/Drivers/Surface/install.sh deleted file mode 100755 index 89bfb040..00000000 --- a/scripts/Arch/Drivers/Surface/install.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; - -. "../../Software/yay/install.sh"; - -curl -s https://raw.githubusercontent.com/linux-surface/linux-surface/master/pkg/keys/surface.asc \ - | sudo pacman-key --add -; - -sudo pacman-key --finger 56C464BAAC421453; -sudo pacman-key --lsign-key 56C464BAAC421453; - -pacmanConf="/etc/pacman.conf"; - -retry() { - retryCount="$1"; - command="${@:2}"; - exitCode=0; - - for i in $(seq 1 $retryCount); - do - eval "$command" && { - exitCode=0; - break; - }; - exitCode="$?"; - done; -} - -if ! grep "^\[linux-surface\]$" "$pacmanConf" -then - { - echo ""; - echo "[linux-surface]"; - echo "Server = https://pkg.surfacelinux.com/arch/"; - } | sudo tee -a "$pacmanConf" > /dev/null; -fi; - -retry 5 sudo pacman --noconfirm -Syu; - -retry 5 sudo pacman --noconfirm -Sy \ - intel-ucode \ - linux-surface \ - linux-surface-headers \ - linux-surface-secureboot-mok \ - iptsd \ - intel-ucode \ - linux-firmware-marvell \ - ; - -sudo grub-mkconfig -o /boot/grub/grub.cfg; -yes | yay --answerclean=None --answerdiff=None -Syu libwacom-surface; - -. "./camera.sh"; - -popd > /dev/null; diff --git a/scripts/Arch/Drivers/SurfaceBook2/install.sh b/scripts/Arch/Drivers/SurfaceBook2/install.sh deleted file mode 100755 index d96ec4f9..00000000 --- a/scripts/Arch/Drivers/SurfaceBook2/install.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; - -. "../../Software/yay/install.sh"; -. "../../Software/nvidia-dkms/install.sh"; -. "../../Software/xone/install.sh"; -. "../Surface/install.sh"; - -{ - echo "# vim:set ft=sh"; - echo "MODULES=(pinctrl_sunrisepoint surface_dtx)"; -} | sudo tee /etc/mkinitcpio.conf.d/surface-book-2.conf; - -yay --noconfirm -Syu \ - surface-dtx-daemon-bin \ - surface-control-bin; - -sudo systemctl enable surface-dtx-daemon.service -systemctl enable --user surface-dtx-userd.service - -popd > /dev/null; diff --git a/scripts/Arch/OS/install.sh b/scripts/Arch/OS/install.sh deleted file mode 100755 index e504beb1..00000000 --- a/scripts/Arch/OS/install.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash -e -rootDir="${BASH_SOURCE%/*}"; -customPortValhallaSudoConfigFile="/etc/sudoers.d/1337_PortValhalla" - -pushd "$rootDir" > /dev/null; -. "../../Common/Scripts/hooks.sh"; -popd > /dev/null; - -function autoRoot() { - { - echo "$USER ALL=(ALL:ALL) NOPASSWD: ALL" - } | sudo tee "$customPortValhallaSudoConfigFile" > /dev/null; -} - -function defaultProfileSetup() { - NEXTCLOUD_DIR="${NEXTCLOUD_DIR}" \ - INSTALL_FONTS=0 \ - . "$(pwd)/../../../scripts/Common/Config/UserProfile/install.sh"; -} - -runHook initialize \ - autoRoot; - -pushd "$rootDir" > /dev/null; -. "../Software/base-devel/install.sh"; -. "../Config/pacman/install.sh"; -. "../Software/yay/install.sh"; -popd > /dev/null; - -sudo pacman --noconfirm -Syu pacman-contrib; - -runHook installDrivers; - -runHook installSoftware \ - . "$(pwd)/../Collections/personal.sh"; - -runHook initializeConfig; - -runHook initializeProfile \ - defaultProfileSetup; - -runHook postInstall \ - sudo rm "$customPortValhallaSudoConfigFile" /var/db/sudo/lectured/$UID; diff --git a/scripts/Arch/OS/setup.sh b/scripts/Arch/OS/setup.sh deleted file mode 100755 index bc71614c..00000000 --- a/scripts/Arch/OS/setup.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/bash -e -CONFIG_MODULE="${CONFIG_MODULE:+"$(realpath "$CONFIG_MODULE")"}"; -pushd "${BASH_SOURCE%/*}" > /dev/null; - -CONFIG_MODULE="${CONFIG_MODULE:-"./config.nix"}"; -ARCH_TIMEZONE="${ARCH_TIMEZONE:-"Europe/Zurich"}"; -ARCH_HOSTNAME="${ARCH_HOSTNAME}"; -ARCH_MOUNT_ROOT="${ARCH_MOUNT_ROOT:-"$(../../eval-module.sh "$CONFIG_MODULE" valhalla.partition.rootDir --raw)"}"; -ARCH_LANG="${ARCH_LANG:-"en_US.UTF-8"}"; -ARCH_KEYMAP="${ARCH_KEYMAP:-"de_CH-latin1"}"; -ARCH_X11_KEYMAP="${ARCH_X11_KEYMAP:-"ch"}"; -LOCALE_PATTERN="${LOCALE_PATTERN:-\(de_CH\|en_US\)}"; - -USER_NAME="${USER_NAME:-"manuel"}"; -USER_DISPLAYNAME="${USER_DISPLAYNAME}"; -USER_GROUPS="${USER_GROUPS}"; - -projectRoot="$(realpath ../../..)"; -projectName="$(basename "$projectRoot")"; -relativeDir="$(realpath --relative-to "$projectRoot" "$(pwd)")"; -tempRoot="/opt/$(basename "$projectName")"; -tempDir="$tempRoot/$relativeDir"; - -loadkeys "$ARCH_KEYMAP"; -timedatectl set-timezone "$ARCH_TIMEZONE"; - -. "../../Common/OS/partition.sh"; - -pacman-key --init; -pacman-key --populate; - -pacstrap -K "$ARCH_MOUNT_ROOT" \ - base \ - linux \ - linux-firmware \ - networkmanager \ - man-db \ - man-pages \ - texinfo \ - ; - -fish ../../copy-repo.fish "${ARCH_MOUNT_ROOT}$tempRoot"; -genfstab -U "$ARCH_MOUNT_ROOT" >> "$ARCH_MOUNT_ROOT/etc/fstab"; - -arch-chroot "$ARCH_MOUNT_ROOT" systemctl enable NetworkManager; - -arch-chroot "$ARCH_MOUNT_ROOT" ln -sf /usr/share/zoneinfo/Europe/Zurich /etc/localtime; -arch-chroot "$ARCH_MOUNT_ROOT" hwclock --systohc; - -arch-chroot "$ARCH_MOUNT_ROOT" sed -i "s/^#\?\($LOCALE_PATTERN.*\)$/\1/" /etc/locale.gen; -arch-chroot "$ARCH_MOUNT_ROOT" locale-gen; - -{ - echo "LANG=de_CH.UTF-8" - echo "LANGUAGE=en_US.UTF-8" - echo "LC_MESSAGES=en_US.UTF-8" -} | arch-chroot "$ARCH_MOUNT_ROOT" tee /etc/locale.conf > /dev/null; - -echo "KEYMAP=$ARCH_KEYMAP" | arch-chroot "$ARCH_MOUNT_ROOT" tee /etc/vconsole.conf > /dev/null; - -echo "$ARCH_HOSTNAME" | arch-chroot "$ARCH_MOUNT_ROOT" tee /etc/hostname; -arch-chroot "$ARCH_MOUNT_ROOT" mkinitcpio -P; - -arch-chroot "$ARCH_MOUNT_ROOT" pacman -Syu; -arch-chroot "$ARCH_MOUNT_ROOT" bash "$tempDir/../Software/GRUB/install.sh"; -arch-chroot "$ARCH_MOUNT_ROOT" bash "$tempDir/../Software/sudo/install.sh"; -pacstrap -K "$ARCH_MOUNT_ROOT" git; - - -USER_NAME="${USER_NAME}" \ -USER_DISPLAYNAME="${USER_DISPLAYNAME}" \ -USER_GROUPS="${USER_GROUPS}" \ - arch-chroot "$ARCH_MOUNT_ROOT" bash "$tempDir/user.sh"; - -cp ./set-keymap.service "$ARCH_MOUNT_ROOT/etc/systemd/system"; -systemd-nspawn -D "$ARCH_MOUNT_ROOT" systemctl enable set-keymap; -systemd-nspawn -bD "$ARCH_MOUNT_ROOT" -E "ARCH_X11_KEYMAP=${ARCH_X11_KEYMAP}"; -systemd-nspawn -D "$ARCH_MOUNT_ROOT" systemctl disable set-keymap; -rm "$ARCH_MOUNT_ROOT/etc/systemd/system/set-keymap.service"; - -popd > /dev/null; diff --git a/scripts/Arch/OS/user.sh b/scripts/Arch/OS/user.sh deleted file mode 100755 index 65b2ab1b..00000000 --- a/scripts/Arch/OS/user.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -USER_NAME="${USER_NAME}"; -USER_DISPLAYNAME="${USER_DISPLAYNAME}"; -USER_GROUPS="${USER_GROUPS}"; -useradd --create-home --comment "$USER_DISPLAYNAME" --groups wheel "$USER_NAME"; -usermod -aG wheel "$USER_NAME"; - -if [ ! -z "$USER_GROUPS" ] -then - usermod -aG "$USER_GROUPS" "$USER_NAME"; -fi; - -echo "Please Choose a New Password for User \`$USER_NAME\`"; - -while ! passwd "$USER_NAME"; -do - echo "An error occurred! Please try again." -done; diff --git a/scripts/Arch/Software/Firefox/install.sh b/scripts/Arch/Software/Firefox/install.sh deleted file mode 100755 index 02b4bad9..00000000 --- a/scripts/Arch/Software/Firefox/install.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; -yay --noconfirm -Syu firefox; -. "../../../Common/Config/Firefox/install.sh"; -popd > /dev/null; diff --git a/scripts/Arch/Software/GNOME/install.sh b/scripts/Arch/Software/GNOME/install.sh deleted file mode 100755 index 16d088cd..00000000 --- a/scripts/Arch/Software/GNOME/install.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -# Elevate script -if [ ! "$UID" -eq 0 ] -then - sudo bash "$BASH_SOURCE" "$USER"; -else - pacman --noconfirm -Syu gnome - systemctl enable gdm; -fi; diff --git a/scripts/Arch/Software/GRUB/install.sh b/scripts/Arch/Software/GRUB/install.sh deleted file mode 100755 index c5c77c2a..00000000 --- a/scripts/Arch/Software/GRUB/install.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -# Elevate script -if [ ! "$UID" -eq 0 ] -then - sudo bash "$BASH_SOURCE" "$USER"; -else - EFI_BOOT_DIR="${EFI_BOOT_DIR:-"/boot"}"; - BOOTLOADER_ID=${BOOTLOADER_ID:-"Arch"}; - - pushd "${BASH_SOURCE%/*}" > /dev/null; - pacman --noconfirm -Syu grub efibootmgr os-prober; - . ../../../Common/Config/GRUB/setup.sh; - popd > /dev/null; -fi; diff --git a/scripts/Arch/Software/IcedTea/install.sh b/scripts/Arch/Software/IcedTea/install.sh deleted file mode 100755 index 2c78f82d..00000000 --- a/scripts/Arch/Software/IcedTea/install.sh +++ /dev/null @@ -1,4 +0,0 @@ -yay --noconfirm -Syu jdk-temurin; -yay --noconfirm -Syu icedtea-web; -# Allow execution of huwaei KVM application (uses out of date security mechanisms) -sudo sed -i "/^jdk.jar.disabledAlgorithms=/{ :comment; s/\(.*\)/#\1/; /\\\\\$/{ n; bcomment; }; }" /usr/lib/jvm/default-runtime/conf/security/java.security; diff --git a/scripts/Arch/Software/KDE/install.sh b/scripts/Arch/Software/KDE/install.sh deleted file mode 100755 index 6dcff892..00000000 --- a/scripts/Arch/Software/KDE/install.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -sudo pacman -Syu --noconfirm \ - pipewire-jack \ - plasma-meta \ - `# As per: https://wiki.archlinux.org/title/KDE#Discover_does_not_show_any_applications` \ - packagekit-qt6 \ - tesseract-data-deu \ - tesseract-data-eng \ - kde-applications-meta \ - `# Automatic rotation: https://wiki.archlinux.org/title/Tablet_PC#With_a_KDE_module` \ - iio-sensor-proxy \ - pipewire-audio \ - pipewire-pulse \ - `# File Exchange Support for KDE Connect: https://wiki.archlinux.org/title/KDE#KDE_Connect` \ - sshfs \ - ; - -sudo systemctl enable --now bluetooth; - -sudo pacman -Syu --noconfirm \ - fwupd \ - ; diff --git a/scripts/Arch/Software/Lutris/install.sh b/scripts/Arch/Software/Lutris/install.sh deleted file mode 100755 index bff15a30..00000000 --- a/scripts/Arch/Software/Lutris/install.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; - -yay --noconfirm --needed -Syu \ - wine-staging \ - giflib \ - lib32-giflib \ - libpng \ - lib32-libpng \ - libldap \ - lib32-libldap \ - gnutls \ - lib32-gnutls \ - mpg123 \ - lib32-mpg123 \ - openal \ - lib32-openal \ - v4l-utils \ - lib32-v4l-utils \ - libpulse \ - lib32-libpulse \ - libgpg-error \ - lib32-libgpg-error \ - alsa-plugins \ - lib32-alsa-plugins \ - alsa-lib \ - lib32-alsa-lib \ - libjpeg-turbo \ - lib32-libjpeg-turbo \ - sqlite \ - lib32-sqlite \ - libxcomposite \ - lib32-libxcomposite \ - libxinerama \ - lib32-libgcrypt \ - libgcrypt \ - lib32-libxinerama \ - ncurses \ - lib32-ncurses \ - ocl-icd \ - lib32-ocl-icd \ - libxslt \ - lib32-libxslt \ - libva \ - lib32-libva \ - gtk3 \ - lib32-gtk3 \ - gst-plugins-base-libs \ - lib32-gst-plugins-base-libs \ - vulkan-icd-loader \ - lib32-vulkan-icd-loader \ - ; - -yay --noconfirm -Syu \ - `# Extracting GOG games` \ - innoextract \ - gamemode \ - lib32-gamemode \ - vkd3d \ - lib32-vkd3d \ - gamescope \ - yad \ - protontricks \ - protonup-qt-bin \ - ; - -yay --noconfirm -Syu \ - lutris \ - ; - -popd > /dev/null; diff --git a/scripts/Arch/Software/NVS/install.sh b/scripts/Arch/Software/NVS/install.sh deleted file mode 100755 index 63558a2f..00000000 --- a/scripts/Arch/Software/NVS/install.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; -yay --noconfirm -Syu nvs-git; -source "/etc/profile.d/nvs.sh"; - -NVS_HOME='$HOME/.nvs' \ -NVS_PATH="$NVS_ROOT" \ - . "../../../Common/Config/NVS/install.sh"; - -popd > /dev/null; diff --git a/scripts/Arch/Software/Pennywise/install.sh b/scripts/Arch/Software/Pennywise/install.sh deleted file mode 100755 index 777616df..00000000 --- a/scripts/Arch/Software/Pennywise/install.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; -yay --noconfirm -Syu pennywise-bin; -. "../../../Common/Config/Pennywise/install.sh"; -popd > /dev/null; diff --git a/scripts/Arch/Software/Virtual Machine Manager/install.sh b/scripts/Arch/Software/Virtual Machine Manager/install.sh deleted file mode 100755 index b21a3e27..00000000 --- a/scripts/Arch/Software/Virtual Machine Manager/install.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; - -yay --noconfirm -Syu \ - qemu-full \ - ; - -yes | yay --answerclean=None --answerdiff=None -Syu \ - virtiofsd \ - virt-manager \ - dnsmasq \ - iptables-nft \ - swtpm \ - lxc \ - virt-bootstrap-git \ - ; - -sudo systemctl enable --now libvirtd; -sudo systemctl enable --now virtlogd; -. "../../../Common/Config/Virtual Machine Manager/install.sh"; - -popd > /dev/null; diff --git a/scripts/Arch/Software/aliae/install.sh b/scripts/Arch/Software/aliae/install.sh deleted file mode 100755 index 91c80393..00000000 --- a/scripts/Arch/Software/aliae/install.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; - -yay --noconfirm -Syu \ - aliae-bin \ - ; - -. "../../../Unix/Config/aliae/install.sh"; - -popd > /dev/null; diff --git a/scripts/Arch/Software/base-devel/install.sh b/scripts/Arch/Software/base-devel/install.sh deleted file mode 100755 index 90046c27..00000000 --- a/scripts/Arch/Software/base-devel/install.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; - -sudo pacman --noconfirm -Syu \ - base-devel \ - ; - -. "../../Config/base-devel/install.sh"; - -popd > /dev/null; diff --git a/scripts/Arch/Software/bt-dualboot/install.sh b/scripts/Arch/Software/bt-dualboot/install.sh deleted file mode 100755 index 5d83463c..00000000 --- a/scripts/Arch/Software/bt-dualboot/install.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -yay --noconfirm -Syu bt-dualboot; diff --git a/scripts/Arch/Software/docker/install.sh b/scripts/Arch/Software/docker/install.sh deleted file mode 100755 index aec22b60..00000000 --- a/scripts/Arch/Software/docker/install.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; - -yay --noconfirm -Syu \ - docker \ - docker-compose \ - docker-buildx \ - docker-scan \ - ; - -. "../../../Common/Config/docker/install.sh"; - -popd > /dev/null; diff --git a/scripts/Arch/Software/git/install.sh b/scripts/Arch/Software/git/install.sh deleted file mode 100755 index 65f9e6da..00000000 --- a/scripts/Arch/Software/git/install.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; - -yay --noconfirm -Syu \ - git \ - git-lfs \ - gitflow-avh \ - gitflow-bashcompletion-avh \ - gitflow-fishcompletion-avh \ - gitflow-zshcompletion-avh \ - ; - -. "../../../Common/Config/git/install.sh"; - -popd > /dev/null; diff --git a/scripts/Arch/Software/gnome-shell-extension-installer/install.sh b/scripts/Arch/Software/gnome-shell-extension-installer/install.sh deleted file mode 100755 index 71e0103f..00000000 --- a/scripts/Arch/Software/gnome-shell-extension-installer/install.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -yay --noconfirm -Syu gnome-shell-extension-installer; diff --git a/scripts/Arch/Software/logo-ls/install.sh b/scripts/Arch/Software/logo-ls/install.sh deleted file mode 100755 index 95e82ce1..00000000 --- a/scripts/Arch/Software/logo-ls/install.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; -dirName="$(pwd)"; -contextRoot="$(mktemp -d)"; -pushd "$contextRoot" > /dev/null; - -pkgName="logo-ls"; -patchName="workaround.patch"; - -yay -G -f "$pkgName"; -cd "$pkgName"; -cp "$dirName/$patchName" .; - -sed -i \ - -e "/^source=(/s/source=(/\0$patchName /" \ - -e "/^md5sums=(/s/^md5sums=(/\0SKIP /" \ - -e "/^build() {/,/}/{" \ - -e "/^[[:space:]]*cd/{" \ - -e "a cat ../$patchName | patch --strip 1 --forward --merge" \ - -e "}" \ - -e "}" \ - PKGBUILD; - -makepkg --noconfirm -si --force; - -popd > /dev/null; -rm -rf "$contextRoot"; - -. "../../../Common/Config/logo-ls/install.sh"; -popd > /dev/null; diff --git a/scripts/Arch/Software/minegrub-theme/install.sh b/scripts/Arch/Software/minegrub-theme/install.sh deleted file mode 100755 index c038bea1..00000000 --- a/scripts/Arch/Software/minegrub-theme/install.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; -yay --noconfirm -Syu grub-theme-minegrub-git; -. "../../../Common/Config/GRUB/minegrub-theme.sh"; -popd > /dev/null; diff --git a/scripts/Arch/Software/nvidia-dkms/install.sh b/scripts/Arch/Software/nvidia-dkms/install.sh deleted file mode 100755 index 754dfa92..00000000 --- a/scripts/Arch/Software/nvidia-dkms/install.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; - -yay --noconfirm -Syu \ - linux-headers \ - ; - -yay --noconfirm -Syu \ - nvidia-beta-dkms \ - lib32-nvidia-utils-beta \ - ; - -. ../../Config/nvidia-dkms/install.sh; -popd > /dev/null; diff --git a/scripts/Arch/Software/openssh/install.sh b/scripts/Arch/Software/openssh/install.sh deleted file mode 100755 index 11dcf8b2..00000000 --- a/scripts/Arch/Software/openssh/install.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; - -yay --noconfirm -Syu \ - openssh \ - libfido2 \ - ; - -# Git Config -source "../../Config/openssh/install.sh"; - -popd > /dev/null; diff --git a/scripts/Arch/Software/rclone/install.sh b/scripts/Arch/Software/rclone/install.sh deleted file mode 100755 index 68d49fad..00000000 --- a/scripts/Arch/Software/rclone/install.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; -yay --noconfirm -Syu rclone; -source "../../../Common/Config/rclone/install.sh"; -popd > /dev/null; diff --git a/scripts/Arch/Software/sddm/install.sh b/scripts/Arch/Software/sddm/install.sh deleted file mode 100755 index 05eb1b8f..00000000 --- a/scripts/Arch/Software/sddm/install.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; -yes | yay --answerclean=None --answerdiff=None -Syu sddm-git; -source "../../Config/sddm/install.sh"; -popd > /dev/null; diff --git a/scripts/Arch/Software/sudo/install.sh b/scripts/Arch/Software/sudo/install.sh deleted file mode 100755 index 96d7b340..00000000 --- a/scripts/Arch/Software/sudo/install.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -# Elevate script -pushd "${BASH_SOURCE%/*}" > /dev/null; - -if [ ! "$UID" -eq 0 ] -then - sudo bash "$BASH_SOURCE"; -else - pacman --noconfirm -Syu sudo; - source "../../Config/sudo/install.sh"; -fi; - -popd > /dev/null; diff --git a/scripts/Arch/Software/vim/install.sh b/scripts/Arch/Software/vim/install.sh deleted file mode 100755 index 96a13f6d..00000000 --- a/scripts/Arch/Software/vim/install.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; - -yay --noconfirm -Syu \ - `# Necessary for accessing clipboard in terminal: https://wiki.archlinux.org/title/Vim` \ - gvim \ - vi-vim-symlink \ - `# Add clipboard support for wayland: https://www.reddit.com/r/Fedora/comments/ax9p9t/comment/jjb4p7b/` \ - vim-wayland-clipboard-git \ - wl-clipboard \ - ; - -. "../../../Common/Config/vim/install.sh"; - -popd > /dev/null; diff --git a/scripts/Arch/Software/waydroid/install.sh b/scripts/Arch/Software/waydroid/install.sh deleted file mode 100755 index ec8a7055..00000000 --- a/scripts/Arch/Software/waydroid/install.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -yay --noconfirm -Syu \ - `# Waydroid prerequisite: https://wiki.archlinux.org/title/Waydroid#DKMS_modules` \ - binder_linux-dkms \ - waydroid \ - `# For installing ARM suppot on waydroid` \ - waydroid-script-git \ - `# Clipboard support: https://wiki.archlinux.org/title/Waydroid#Failed_to_start_Clipboard_manager_service` \ - python-pyclip \ - `# Wayland clipboard support: https://github.com/spyoungtech/pyclip?tab=readme-ov-file#linux` \ - wl-clipboard \ - ; diff --git a/scripts/Arch/Software/xone/install.sh b/scripts/Arch/Software/xone/install.sh deleted file mode 100755 index 3d0f7452..00000000 --- a/scripts/Arch/Software/xone/install.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# Prerequisites -sudo pacman --noconfirm -Syu cabextract; - -contextRoot="$(mktemp -d)"; -repo="https://github.com/manuth/xone.git"; -pushd "$contextRoot" > /dev/null; - -if ! dkms status --all | grep xone > /dev/null; -then - git clone "$repo" "$contextRoot"; - sudo ./install.sh --release; - sudo chmod -R a+rx /usr/src/xone*; - yes "" | sudo xone-get-firmware.sh; -fi; -popd > /dev/null; -rm -rf "$contextRoot" > /dev/null; diff --git a/scripts/Arch/Software/yay/install.sh b/scripts/Arch/Software/yay/install.sh deleted file mode 100755 index 564a01ca..00000000 --- a/scripts/Arch/Software/yay/install.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -if ! command -v yay > /dev/null 2>&1 -then - sudo pacman --noconfirm -S --needed git - contextRoot="$(mktemp -d)"; - - git clone https://aur.archlinux.org/yay.git "$contextRoot"; - pushd "$contextRoot" > /dev/null; - makepkg --noconfirm -si; - popd > /dev/null; - - rm -rf "$contextRoot"; -fi; diff --git a/scripts/Arch/Software/ytmdesktop/install.sh b/scripts/Arch/Software/ytmdesktop/install.sh deleted file mode 100755 index 93fe78a9..00000000 --- a/scripts/Arch/Software/ytmdesktop/install.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -contextRoot="$(mktemp -d)"; -pushd "$contextRoot" > /dev/null; - -yay --noconfirm -Syu electron13-bin; - -yes | pipenv run --python 3.10 -- \ - yay --noconfirm -Syu \ - ytmdesktop \ - || true; - -popd > /dev/null; -rm -rf "$contextRoot"; diff --git a/scripts/Common/Config/EasyEffects/SurfaceBook2/install.sh b/scripts/Common/Config/EasyEffects/SurfaceBook2/install.sh deleted file mode 100755 index 53a10b07..00000000 --- a/scripts/Common/Config/EasyEffects/SurfaceBook2/install.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -cp ${BASH_SOURCE%/*}/*.json ~/.var/app/com.github.wwmm.easyeffects/config/easyeffects/output/; diff --git a/scripts/Common/Config/Firefox/install.sh b/scripts/Common/Config/Firefox/install.sh deleted file mode 100755 index 6244401f..00000000 --- a/scripts/Common/Config/Firefox/install.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; -sudo cp ../../Software/Firefox/firefox.sh /etc/profile.d/; -popd > /dev/null; diff --git a/scripts/Common/Config/Fonts/MicrosoftFonts/install.sh b/scripts/Common/Config/Fonts/MicrosoftFonts/install.sh deleted file mode 100755 index 567ab245..00000000 --- a/scripts/Common/Config/Fonts/MicrosoftFonts/install.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -# Elevate script -if [ ! "$UID" -eq 0 ] -then - sudo bash "$BASH_SOURCE" "$USER"; -else - tempDir="$(mktemp -d)"; - pushd "$tempDir" > /dev/null; - - git clone https://github.com/fangfufu/httpdirfs.git; - pushd httpdirfs > /dev/null; - make; - install -m 755 -D httpdirfs /usr/local/bin/httpdirfs; - popd > /dev/null; - - git clone https://aur.archlinux.org/ttf-ms-win11-auto.git ttf-win11; - pushd ttf-win11 > /dev/null; - # shellcheck source=/dev/null - source ./PKGBUILD; - prepare; - package_ttf-ms-win11-auto; - - rm -f /usr/local/bin/httpdirfs; - - popd > /dev/null; - 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; - - popd > /dev/null; -fi diff --git a/scripts/Common/Config/Fonts/NerdFont/install.sh b/scripts/Common/Config/Fonts/NerdFont/install.sh deleted file mode 100755 index 2e1ad457..00000000 --- a/scripts/Common/Config/Fonts/NerdFont/install.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -NEXTCLOUD_DIR="${NEXTCLOUD_DIR}"; - -# Elevate script -if [ ! "$UID" -eq 0 ] -then - sudo NEXTCLOUD_DIR="${NEXTCLOUD_DIR}" bash "$BASH_SOURCE" "$USER"; -else - homeDir="$(realpath ~$1)"; - 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/.mnt/$NEXTCLOUD_DIR/Caskaydia Cove Regular Nerd Font Complete.otf" "$tempFile"; - cp "$tempFile" /usr/share/fonts/opentype; -fi diff --git a/scripts/Common/Config/GRUB/minegrub-theme.sh b/scripts/Common/Config/GRUB/minegrub-theme.sh deleted file mode 100755 index b4b8c6b0..00000000 --- a/scripts/Common/Config/GRUB/minegrub-theme.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -sudo sed -i "s/^#\?\(GRUB_THEME=\).*$/\1\"\/usr\/share\/grub\/themes\/minegrub\/minegrub\/theme.txt\"/" /etc/default/grub; -sudo grub-mkconfig -o /boot/grub/grub.cfg; diff --git a/scripts/Common/Config/GRUB/setup.sh b/scripts/Common/Config/GRUB/setup.sh deleted file mode 100755 index eb690180..00000000 --- a/scripts/Common/Config/GRUB/setup.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -EFI_BOOT_DIR="${EFI_BOOT_DIR}"; -BOOTLOADER_ID="${BOOTLOADER_ID}"; - -# Elevate script -if [ ! "$UID" -eq 0 ] -then - sudo \ - EFI_BOOT_DIR="${EFI_BOOT_DIR}" \ - BOOTLOADER_ID="${BOOTLOADER_ID}" \ - bash "$BASH_SOURCE"; -else - sed -i \ - -e "s/#\(GRUB_DISABLE_OS_PROBER\)/\1/" \ - `#-e "/^GRUB_CMDLINE_LINUX_DEFAULT=/{"` \ - `#-e "h; s/^/#/; p;"` \ - `#-e "g; s/loglevel=3 quiet//"` \ - `#-e "}"` \ - /etc/default/grub; - - grub-install --target=x86_64-efi --efi-directory="$EFI_BOOT_DIR" --bootloader-id="$BOOTLOADER_ID"; - grub-mkconfig -o "$EFI_BOOT_DIR/grub/grub.cfg"; -fi; diff --git a/scripts/Common/Config/GRUB/verbose.sh b/scripts/Common/Config/GRUB/verbose.sh deleted file mode 100755 index 96868c71..00000000 --- a/scripts/Common/Config/GRUB/verbose.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -configFile=/etc/default/grub; -pattern="^\\(GRUB_CMDLINE_LINUX_DEFAULT=\".*\\)\\([[:space:]]quiet\\|quiet[[:space:]]\\)\\(.*\".*\\)$"; - -if grep "$pattern" "$configFile" > /dev/null -then - sudo sed -i "/$pattern/{ h; s/^\\(.*\\)$/#\\1/; p; x; s/$pattern/\\1\\3/; };" "$configFile"; - sudo grub-mkconfig -o /boot/grub/grub.cfg; -fi; diff --git a/scripts/Common/Config/GnomeExtensions/install-extension.sh b/scripts/Common/Config/GnomeExtensions/install-extension.sh deleted file mode 100755 index c4e59527..00000000 --- a/scripts/Common/Config/GnomeExtensions/install-extension.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -function installExtension() { - local -n queue="$1"; - - for id in ${queue[@]} - do - gnome-shell-extension-installer "$id" --yes; - done; -} diff --git a/scripts/Common/Config/GnomeExtensions/install.sh b/scripts/Common/Config/GnomeExtensions/install.sh deleted file mode 100755 index 9ade174e..00000000 --- a/scripts/Common/Config/GnomeExtensions/install.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; -. "../../gnome-shell-extension-installer/install.sh"; -. "./install-extension.sh"; - -extensions=( - 5278 # pano https://extensions.gnome.org/extension/5278/pano/ - 4907 # EasyEffects Preset Selector https://extensions.gnome.org/extension/4907/easyeffects-preset-selector/ - 1162 # Emoji Selector https://extensions.gnome.org/extension/1162/emoji-selector/ -); - -installExtension extensions; -killall -SIGQUIT gnome-shell; -popd > /dev/null; diff --git a/scripts/Common/Config/Oh My Posh/install.ps1 b/scripts/Common/Config/Oh My Posh/install.ps1 deleted file mode 100644 index c06f1af1..00000000 --- a/scripts/Common/Config/Oh My Posh/install.ps1 +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../../Software/PowerShell/Profile.ps1"; - -Add-PowerShellProfileStatement ` - -System ` - -Category "oh-my-posh" ` - -Script $( - @( - "# Oh My Posh!", - $(Get-ScriptInitializer "oh-my-posh init pwsh"), - $(Get-ScriptInitializer "oh-my-posh completion powershell") - ) -join [System.Environment]::NewLine - ) diff --git a/scripts/Common/Config/Oh My Posh/install.sh b/scripts/Common/Config/Oh My Posh/install.sh deleted file mode 100755 index 137c67e0..00000000 --- a/scripts/Common/Config/Oh My Posh/install.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; -. "../bash/profile.sh"; -. "../fish/profile.sh"; -NEXTCLOUD_DIR="${NEXTCLOUD_DIR}"; -themeDir="/usr/local/share/oh-my-posh/themes"; -sudo install -dm755 "$themeDir"; -cat ~/.mnt/$NEXTCLOUD_DIR/.omp/manuel.omp.json | sudo tee "$themeDir/manuel.omp.json" > /dev/null; - -{ - echo 'eval "$(oh-my-posh init bash)"'; - echo 'eval "$(oh-my-posh completion bash)"'; -} | addBashProfile "oh-my-posh" "Oh My Posh!"; - -{ - echo "oh-my-posh init fish | source"; - echo "oh-my-posh completion fish | source"; -} | addFishProfile "oh-my-posh" "Oh My Posh!"; - -sudo pwsh -NoProfile ./install.ps1; - -popd > /dev/null; diff --git a/scripts/Common/Config/Pennywise/install.sh b/scripts/Common/Config/Pennywise/install.sh deleted file mode 100755 index e09786be..00000000 --- a/scripts/Common/Config/Pennywise/install.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -desktopFile=/usr/share/applications/pennywise.desktop; - -if ! grep "^Exec=.* --no-sandbox" "$desktopFile" > /dev/null -then - sudo sed -i '/^Exec=/s/^Exec=".*"/\0 --no-sandbox/' "$desktopFile"; -fi; diff --git a/scripts/Common/Config/Steam/hidpi.sh b/scripts/Common/Config/Steam/hidpi.sh deleted file mode 100755 index a407041d..00000000 --- a/scripts/Common/Config/Steam/hidpi.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -{ - echo '#!/bin/bash'; - echo 'export STEAM_FORCE_DESKTOPUI_SCALING=2.0'; -} | sudo tee /etc/profile.d/steam.sh > /dev/null; diff --git a/scripts/Common/Config/UserProfile/install.sh b/scripts/Common/Config/UserProfile/install.sh deleted file mode 100755 index 20b4ebd8..00000000 --- a/scripts/Common/Config/UserProfile/install.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash -NEXTCLOUD_DIR="${NEXTCLOUD_DIR:-Nextcloud}"; -PROTON_DIR="${PROTON_DIR:-Proton}"; -INSTALL_FONTS="${INSTALL_FONTS}"; - -if [ "$XDG_SESSION_TYPE" = "tty" ] -then - entryPoint=~/.config/autostart/PortValhallaProfile.desktop; - mkdir -p "$(dirname "$entryPoint")"; - - { - echo "#!/usr/bin/env xdg-open"; - echo "[Desktop Entry]"; - echo "Name=PortValhalla Profile"; - echo "Type=Application"; - echo "Terminal=false"; - echo -n "Exec=env " - echo -n "NEXTCLOUD_DIR=\"${NEXTCLOUD_DIR}\" "; - echo -n "PROTON_DIR=\"${PROTON_DIR}\" "; - echo -n "INSTALL_FONTS=\"${INSTALL_FONTS}\" "; - echo -n "konsole -e bash -e $(realpath $BASH_SOURCE)"; - } > "$entryPoint"; - - chmod a+x "$entryPoint"; - dbus-launch --exit-with-session startplasma-wayland > /dev/null 2>&1; - rm "$entryPoint"; - rm ~/.config/plasma-welcomerc; -else - dir="${BASH_SOURCE%/*}"; - pushd "$dir" > /dev/null; - . "../../Scripts/is-truthy.sh"; - - # Sync clouds - echo "Please complete the setup of your profile!"; - NEXTCLOUD_DIR="${NEXTCLOUD_DIR}" . "../rclone/InstallSync.sh" nextcloud "$NEXTCLOUD_DIR"; - PROTON_DIR="${PROTON_DIR}" . "../rclone/InstallSync.sh" proton "$PROTON_DIR" "2w"; - - if isTruthy "$INSTALL_FONTS" - then - # Install fonts - NEXTCLOUD_DIR="${NEXTCLOUD_DIR}" source "../Fonts/NerdFont/install.sh"; - fi; - - NEXTCLOUD_DIR="${NEXTCLOUD_DIR}" source "../Oh My Posh/install.sh"; - echo "You are done! Please log out!"; - read; - - popd > /dev/null; -fi; diff --git a/scripts/Common/Config/Virtual Machine Manager/install.sh b/scripts/Common/Config/Virtual Machine Manager/install.sh deleted file mode 100755 index 9c7890b7..00000000 --- a/scripts/Common/Config/Virtual Machine Manager/install.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -sudo usermod -aG libvirt "$USER"; -sudo virsh net-autostart default; - -if ! sudo virsh net-info default | grep "^Active:\s*yes$" > /dev/null; -then - sudo virsh net-start default || true; -fi; diff --git a/scripts/Common/Config/aliae/install.ps1 b/scripts/Common/Config/aliae/install.ps1 deleted file mode 100644 index 82cae57b..00000000 --- a/scripts/Common/Config/aliae/install.ps1 +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../../Software/PowerShell/Profile.ps1"; - -foreach ($defaultUser in @($true, $false)) { - Add-PowerShellProfileStatement -DefaultUser:$defaultUser -Script "# aliae`naliae init pwsh | Invoke-Expression"; -} - -Add-PowerShellProfileStatement -System -Category "aliae" -Script "# aliae`n$(Get-ScriptInitializer "aliae completion powershell")"; diff --git a/scripts/Common/Config/aliae/install.sh b/scripts/Common/Config/aliae/install.sh deleted file mode 100755 index 50f1def0..00000000 --- a/scripts/Common/Config/aliae/install.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; -. "../bash/profile.sh"; - -if ! grep "\baliae\b" ~/.bashrc > /dev/null -then - { - echo '# aliae'; - echo 'eval "$(aliae init bash)"'; - echo ""; - } >> ~/.bashrc; -fi; - -profileFile="$(pwsh -c '$PROFILE')"; - -if [ ! -f "$profileFile" ] || ! grep "\baliae\b" "$profileFile" > /dev/null -then - pwsh "./install.ps1"; -fi; - -{ - echo 'eval "$(aliae completion bash)"'; -} | addBashProfile "aliae"; - -popd > /dev/null; diff --git a/scripts/Common/Config/bash/profile.sh b/scripts/Common/Config/bash/profile.sh deleted file mode 100755 index 780759da..00000000 --- a/scripts/Common/Config/bash/profile.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; -. "../../Scripts/profile-base.sh"; - -function addBashProfile() { - name="$1"; - title="${2:-$1}"; - addProfileStatement "$name" "$title" "/bin/bash" "sh" "/etc/bash/conf.d" "${@:3}"; -} - -popd > /dev/null; diff --git a/scripts/Common/Config/docker/install.sh b/scripts/Common/Config/docker/install.sh deleted file mode 100755 index 1ba9ed03..00000000 --- a/scripts/Common/Config/docker/install.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -sudo usermod -aG docker "$USER"; -sudo systemctl enable --now docker; diff --git a/scripts/Common/Config/fish/profile.sh b/scripts/Common/Config/fish/profile.sh deleted file mode 100755 index 0d831d55..00000000 --- a/scripts/Common/Config/fish/profile.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; -. "../../Scripts/profile-base.sh"; - -function addFishProfile() { - name="$1"; - title="${2:-$1}"; - addProfileStatement "$name" "$title" "/bin/fish" "fish" "/etc/fish/conf.d" "${@:3}"; -} - -popd > /dev/null; diff --git a/scripts/Common/Config/git/flow/install.sh b/scripts/Common/Config/git/flow/install.sh deleted file mode 100755 index b289cb28..00000000 --- a/scripts/Common/Config/git/flow/install.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -contextRoot="$(mktemp -d)"; -pushd "$contextRoot" > /dev/null; -git init; -git commit --allow-empty -m "Initial commit" > /dev/null; -git branch master || true > /dev/null 2>&1; -git branch main || true > /dev/null 2>&1; -git branch dev || true > /dev/null 2>&1; -yes "" | git flow init > /dev/null 2>&1; -git flow config set --global master main > /dev/null; -git flow config set --global develop dev > /dev/null; -popd > /dev/null; -rm -rf "$contextRoot"; diff --git a/scripts/Common/Config/git/git-auf-deutsch/install.sh b/scripts/Common/Config/git/git-auf-deutsch/install.sh deleted file mode 100755 index e7d4c53c..00000000 --- a/scripts/Common/Config/git/git-auf-deutsch/install.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; - -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; -popd > /dev/null; diff --git a/scripts/Common/Config/git/install.sh b/scripts/Common/Config/git/install.sh deleted file mode 100755 index 4f9be280..00000000 --- a/scripts/Common/Config/git/install.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; - -# Git Config -source "./setup/install.sh"; -source "./flow/install.sh"; - -# Troll Stuff -source "./git-auf-deutsch/install.sh"; - -popd > /dev/null; diff --git a/scripts/Common/Config/git/setup/install.sh b/scripts/Common/Config/git/setup/install.sh deleted file mode 100755 index 927ccccb..00000000 --- a/scripts/Common/Config/git/setup/install.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -git config --global init.defaultBranch "main"; -git config --global user.name "Manuel Thalmann"; -git config --global user.email "m@nuth.ch"; diff --git a/scripts/Common/Config/logo-ls/install.sh b/scripts/Common/Config/logo-ls/install.sh deleted file mode 100755 index 96446ddc..00000000 --- a/scripts/Common/Config/logo-ls/install.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; -. "../bash/profile.sh"; -. "../fish/profile.sh"; -functionName="_PortValhalla_ls_"; - -function dump_header() { - echo "# logo-ls"; -} - -function dump_aliases() { - echo "alias ls='$functionName'"; - echo "alias ll='ls -al'"; - echo "alias l='ls'"; -} - -{ - dump_header; - echo "function $functionName"; - echo " if [ -t 1 ]"; - echo ' logo-ls -D $argv;'; - echo " else"; - echo " alias ls=ls;"; - echo ' ls --color=auto $argv;'; - echo " alias ls='$functionName';"; - echo " end"; - echo "end"; - echo ""; - dump_aliases; -} | addFishProfile "logo-ls"; - -{ - echo ""; - dump_header; - echo "function ${functionName}() {"; - echo " if [ -t 1 ]"; - echo " then"; - echo ' logo-ls -D "$@";'; - echo " else"; - echo ' ls --color=auto "$@";' - echo " fi;" - echo "}"; - echo ""; - dump_aliases; -} | addBashProfile "logo-ls"; - -popd > /dev/null; diff --git a/scripts/Common/Config/nvidia-dkms/install.sh b/scripts/Common/Config/nvidia-dkms/install.sh deleted file mode 100755 index 53037fd3..00000000 --- a/scripts/Common/Config/nvidia-dkms/install.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -function install() { - local cmdindicator="GRUB_CMDLINE_LINUX_DEFAULT=\""; - local config="nvidia_drm.fbdev=1"; - - # According to: https://wiki.archlinux.org/title/NVIDIA/Tips_and_tricks - { - echo "options nvidia NVreg_PreserveVideoMemoryAllocations=1"; - echo "options nvidia NVreg_TemporaryFilePath=/var/tmp"; - } | sudo tee /etc/modprobe.d/nvidia-power-management.conf > /dev/null; - - sudo systemctl enable \ - nvidia-suspend.service \ - nvidia-hibernate.service \ - nvidia-resume.service; - - if ! cat /etc/default/grub | grep "$cmdindicator.*$config" > /dev/null; - then - sudo sed -i /etc/default/grub \ - -e "/$cmdindicator/{" \ - -e "s/\($cmdindicator.*[^ ]\)\(\"\)/\1 \2/" \ - -e "s/\($cmdindicator.*\)\(\"\)/\1$config\2/" \ - -e "}" \ - ; - fi; -} - -install; diff --git a/scripts/Common/Config/pyenv/install.sh b/scripts/Common/Config/pyenv/install.sh deleted file mode 100755 index c69c9ee8..00000000 --- a/scripts/Common/Config/pyenv/install.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; -. "../fish/profile.sh"; -. "../bash/profile.sh"; - -{ - echo 'export PYENV_ROOT="$HOME/.pyenv"'; - echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"'; - echo 'eval "$(pyenv init -)"'; -} | addBashProfile "pyenv"; - -addFishProfile "pyenv" "pyenv" "pyenv init - | source"; -popd > /dev/null; diff --git a/scripts/Common/Config/rclone/InstallSync.sh b/scripts/Common/Config/rclone/InstallSync.sh deleted file mode 100755 index 585b3acf..00000000 --- a/scripts/Common/Config/rclone/InstallSync.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -provider="$1"; -dirname="$2"; -cacheDuration="$3"; -serviceName="rclone@$provider:$dirname"; - -if [ ! -z "${cacheDuration}" ] -then - serviceName="${serviceName}:$cacheDuration"; -fi; - -echo "Please create a remote called \`$1\`"; -rclone config || true; -systemctl --user enable "$serviceName" --now || true; diff --git a/scripts/Common/Config/rclone/install.sh b/scripts/Common/Config/rclone/install.sh deleted file mode 100755 index 0cc10c8a..00000000 --- a/scripts/Common/Config/rclone/install.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}/../../Software/rclone" > /dev/null; - -sudo cp "rclone.service" "rclone.target" "rclone@.service" /etc/systemd/user; -systemctl enable --user rclone; -mkdir -p ~/.mnt; -touch ~/.mnt/.trackerignore; - -popd > /dev/null; diff --git a/scripts/Common/Config/udev/ct-board.sh b/scripts/Common/Config/udev/ct-board.sh deleted file mode 100755 index 0a50cc8c..00000000 --- a/scripts/Common/Config/udev/ct-board.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -{ - echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="0483", MODE="0666"'; -} | sudo tee /etc/udev/rules.d/50-ct-board.rules; diff --git a/scripts/Common/Config/vim/install.sh b/scripts/Common/Config/vim/install.sh deleted file mode 100755 index 3bf0ca57..00000000 --- a/scripts/Common/Config/vim/install.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -indicator="set clipboard"; -configFile="/etc/vimrc"; - -if ! grep "\b$indicator\b" "$configFile" > /dev/null -then - # As described in https://wiki.archlinux.org/title/Vim#Clipboard - echo "$indicator+=unnamed,unnamedplus" | sudo tee /etc/vimrc > /dev/null; -fi; diff --git a/scripts/Common/Config/vscode/install.sh b/scripts/Common/Config/vscode/install.sh deleted file mode 100755 index ff028bba..00000000 --- a/scripts/Common/Config/vscode/install.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -for editor_bin in \ - codium \ - codium-insiders \ - code \ - code-insiders -do - if command -v "$editor_bin" > /dev/null 2>&1 - then - for extension in \ - zokugun.sync-settings \ - zokugun.vsix-manager - do - $editor_bin --install-extension "$extension"; - done; - fi; -done; diff --git a/scripts/Common/Config/zoxide/install.ps1 b/scripts/Common/Config/zoxide/install.ps1 deleted file mode 100644 index 6b35f717..00000000 --- a/scripts/Common/Config/zoxide/install.ps1 +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../../Software/PowerShell/Profile.ps1"; - -Add-PowerShellProfileStatement ` - -System ` - -Category "zoxide" ` - -Script $( - @( - "# zoxide", - $(Get-ScriptInitializer "zoxide init powershell | Out-String") - ) -join [System.Environment]::NewLine - ) diff --git a/scripts/Common/Config/zoxide/install.sh b/scripts/Common/Config/zoxide/install.sh deleted file mode 100755 index 0ae00598..00000000 --- a/scripts/Common/Config/zoxide/install.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; -. "../bash/profile.sh"; -. "../fish/profile.sh"; - -{ - echo 'eval "$(zoxide init bash)"'; -} | addBashProfile "zoxide"; - -{ - echo "zoxide init fish | source"; -} | addFishProfile "zoxide"; - -sudo pwsh -NoProfile ./install.ps1; - -popd > /dev/null; diff --git a/scripts/Common/OS/partition.sh b/scripts/Common/OS/partition.sh deleted file mode 100755 index d19aa9b7..00000000 --- a/scripts/Common/OS/partition.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -eval "$("${BASH_SOURCE%/*}/../../eval-module.sh" "$CONFIG_MODULE" valhalla.partition.script --raw)"; diff --git a/scripts/Common/Scripts/Context.ps1 b/scripts/Common/Scripts/Context.ps1 deleted file mode 100644 index 17505809..00000000 --- a/scripts/Common/Scripts/Context.ps1 +++ /dev/null @@ -1,417 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../../Common/Scripts/Entrypoints.ps1"; -. "$PSScriptRoot/../../Common/Software/PowerShell/Profile.ps1"; - -class Context { - [string]$EntryPoint; - [string]$RootDir; - [string]$BackupName; - [string[]]$UserNames; - [string]$AdminName = "Admin"; - [string]$ConfigRoot = "HKLM:\Software\PortValhalla"; - [string]$RunOnceName = "PortValhalla"; - [string]$StagePropertyName = "Stage"; - - Context() { - try { - $this.EntryPoint = Get-Entrypoint; - } - catch { } - } - - [string] ProjectRoot() { - return Resolve-Path (Join-Path $PSScriptRoot ".." ".." ".."); - } - - [string] BackupRoot() { - if (-not $this.RootDir) - { - return Join-Path $this.ProjectRoot() "backup" $this.BackupName; - } - else - { - return $this.RootDir; - } - } - - [void] RemoveDesktopIcon($pattern) { - Remove-Item "$env:PUBLIC/Desktop/$pattern"; - Remove-Item "~/Desktop/$pattern"; - } - - [void] RemoveTaskbarItem($pattern) { - Import-Module -UseWindowsPowerShell PinnedItem; - Get-PinnedItem -Type TaskBar | Where-Object { $_.Name -like "$pattern" } | Remove-PinnedItem; - } - - [void] AddPowerShellProfileStatement([string] $statement) { - $this.AddPowerShellProfileStatement($true, $statement); - } - - [void] AddPowerShellProfileStatement([string] $category, [string] $statement) { - $this.AddPowerShellProfileStatement($true, $category, $statement); - } - - [void] AddPowerShellProfileStatement([bool] $system, [string] $statement) { - $this.AddPowerShellProfileStatement($system, $null, $statement); - } - - [void] AddPowerShellProfileStatement([bool] $system, [string] $category, [string] $statement) { - if ($category) { - $overwrite = $true; - } else { - $overwrite = $false; - } - - $this.AddPowerShellProfileStatement($system, $category, $statement, $overwrite); - } - - [void] AddPowerShellProfileStatement([bool] $system, [string] $category, [string] $statement, [bool] $overwrite) { - if ($system) { - Add-PowerShellProfileStatement -System -Category $category -Script $statement -Overwrite:$overwrite; - } else { - Add-PowerShellProfileStatement -Category $category -Script $statement -Overwrite:$overwrite; - } - } - - [Microsoft.Win32.RegistryKey] EnsureConfigKey() { - if (-not (Test-Path $this.ConfigRoot)) { - $null = New-Item $this.ConfigRoot; - $acl = Get-Acl $this.ConfigRoot; - - $acl.AddAccessRule( - [System.Security.AccessControl.RegistryAccessRule]::new( - [System.Security.Principal.SecurityIdentifier]::new([System.Security.Principal.WellKnownSidType]::BuiltinUsersSid, $null), - [System.Security.AccessControl.RegistryRights]::FullControl, - [System.Security.AccessControl.InheritanceFlags]::ObjectInherit -bor [System.Security.AccessControl.InheritanceFlags]::ContainerInherit, - [System.Security.AccessControl.PropagationFlags]::None, - [System.Security.AccessControl.AccessControlType]::Allow)); - - Set-Acl $this.ConfigRoot $acl; - } - - return Get-Item $this.ConfigRoot; - } - - [object] Get([string] $key) { - $configKey = $this.EnsureConfigKey(); - if ($configKey.GetValueNames().Contains($key)) { - return $configKey.GetValue($key); - } else { - return $null; - } - } - - [void] Set([string] $key, $value) { - $this.Set($key, $value, "ExpandString"); - } - - [void] Set([string] $key, $value, [Microsoft.Win32.RegistryValueKind] $type) { - $configKey = $this.EnsureConfigKey(); - $null = Set-ItemProperty -Path $configKey.PSPath -Name $key -Value $value -Type $type; - } - - [void] Remove([string] $key) { - $configKey = $this.EnsureConfigKey(); - $null = Remove-ItemProperty -Path $configKey.PSPath -Name $key; - } - - [void] SetStage([string] $name) { - $this.Set($this.StagePropertyName, $name); - } - - [string] GetStage() { - return $this.Get($this.StagePropertyName); - } - - [void] RemoveStage() { - $this.Remove($this.StagePropertyName); - } - - [string] ArchivePath($name) { - return Join-Path $this.BackupRoot() "$name.7z"; - } - - [string] FileArchivePath($name) { - return $this.ArchivePath($(Join-Path "Files" $name)); - } - - [string] SoftwareArchive([string]$softwareName) { - return $this.ArchivePath($softwareName); - } - - [void] Backup([string]$sourcePath, [string]$archivePath) { - $this.Backup($sourcePath, $archivePath, @()); - } - - [void] Backup([string]$sourcePath, [string]$archivePath, [string[]]$arguments) { - $this.Backup($sourcePath, $archivePath, $arguments, $true); - } - - [void] Backup([string]$sourcePath, [string]$archivePath, [string[]]$arguments, [bool]$split) { - if (Test-Path $archivePath) { - Remove-Item -Recurse $archivePath; - } - - if (Test-Path "$archivePath.*") { - Remove-Item -Recurse "$archivePath.*"; - } - - Start-Process -WorkingDirectory "$sourcePath" ` - -FilePath "7z" ` - -ArgumentList ( - @( - "a", - "-xr!desktop.ini", - "-xr!thumbs.db", - "-xr!Thumbs.db", - "-slp", - $archivePath) + $arguments + $( - if ($split) { - @("-v2g"); - } else { - @(); - } - )) ` - -Wait ` - -NoNewWindow; - } - - [void] Restore([string]$archivePath, [string]$destinationPath) { - $this.Restore($archivePath, $destinationPath, @()); - } - - [void] Restore([string]$archivePath, [string]$destinationPath, [string[]] $arguments) { - if (-not (Test-Path -PathType Leaf $archivePath)) { - $archivePath = "$archivePath.001"; - } - - if (-not (Test-Path -PathType Leaf $archivePath)) { - Write-Information ( - [string]::Join( - "`n", - @( - "An archive at the specified path $archivePath does not exist.", - "No restoration will be performed."))); - } - else { - if (-not (Test-Path -PathType Container $destinationPath)) { - New-Item -ItemType Directory "$destinationPath"; - } - - Start-Process -WorkingDirectory "$destinationPath" ` - -FilePath "7z" ` - -ArgumentList @("x", "$archivePath") + $arguments ` - -Wait ` - -NoNewWindow; - } - } - - [string] GetTempDirectory() { - $tempDir = Join-Path $([System.IO.Path]::GetTempPath()) $([System.IO.Path]::GetRandomFileName()); - $null = New-Item -ItemType Directory $tempDir; - return $tempDir; - } - - [void] ProcessDefaultUserKey([System.Action[Microsoft.Win32.RegistryKey]] $action) { - $rootPath = "HKLM:\DefaultUser"; - $regRootPath = $rootPath.Replace(":", ""); - $hivePath = "$env:SystemDrive\Users\Default\NTUSER.dat" - $null = & reg load $regRootPath $hivePath; - $root = Get-Item $rootPath; - $action.Invoke($root); - $root.Handle.Close(); - [System.GC]::Collect(); - & reg unload $regRootPath; - } - - [void] ProcessLogonKey([System.Action[Microsoft.Win32.RegistryKey]] $action) { - $key = Get-Item "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon"; - $action.Invoke($key); - } - - [Microsoft.Win32.RegistryKey] GetSystemPolicyKey() { - $keyPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"; - return Get-Item "$keyPath"; - } - - [Microsoft.Win32.RegistryKey] GetRunOnceKey() { - return $this.GetRunOnceKey($null); - } - - [Microsoft.Win32.RegistryKey] GetRunOnceKey([Microsoft.Win32.RegistryKey] $userKey) { - if (-not $userKey) { - $userKey = Get-Item "HKCU:\"; - } - - Push-Location $userKey.PSPath; - $runOncePath = "Software\Microsoft\Windows\CurrentVersion\RunOnce"; - - if (-not (Test-Path $runOncePath)) { - New-Item $runOncePath; - } - - $result = Get-Item $runOncePath; - Pop-Location; - return $result; - } - - [bool] GetUACState() { - return [bool](Get-ItemPropertyValue -Path ($this.GetSystemPolicyKey().PSPath) -Name "EnableLUA"); - } - - [void] SetUACState([bool] $value) { - $null = Set-ItemProperty -Path ($this.GetSystemPolicyKey().PSPath) -Name "EnableLUA" -Value ([int]$value); - } - - [void] RegisterReboot() { - $this.RegisterReboot($null); - } - - [void] RegisterReboot([Microsoft.Win32.RegistryKey] $userKey) { - $runOnceKey = $this.GetRunOnceKey($userKey); - Set-ItemProperty -Path $runOnceKey.PSPath -Name $this.RunOnceName -Value "pwsh `"$($this.EntryPoint)`"" -Type "ExpandString"; - $runOnceKey.Handle.Close(); - } - - [void] RegisterNewUserReboot() { - $this.ProcessDefaultUserKey({ param ($root) $this.RegisterReboot($root); }); - } - - [void] DeregisterNewUserReboot() { - $this.ProcessDefaultUserKey({ param ($root) Remove-Item -Path $this.GetRunOnceKey($root).PSPath }); - } - - [void] SetAutologin($user, $pw) { - $this.ProcessLogonKey( - { - param ($logon) - $path = $logon.PSPath; - Set-ItemProperty $path -Name "AutoAdminLogon" 1; - Set-ItemProperty $path -Name "DefaultUserName" $user; - - if ($pw) { - Set-ItemProperty $path -Name "DefaultPassword" $pw; - } else { - Remove-ItemProperty $path -Name "DefaultPassword"; - } - }); - } - - [void] RemoveAutologin() { - $this.ProcessLogonKey( - { - param ($logon) - $path = $logon.PSPath; - Set-ItemProperty $path -Name "AutoAdminLogon" 0; - Remove-ItemProperty $path -Name "DefaultDomainName" -ErrorAction SilentlyContinue; - Remove-ItemProperty $path -Name "DefaultUserName" -ErrorAction SilentlyContinue; - Remove-ItemProperty $path -Name "DefaultPassword" -ErrorAction SilentlyContinue; - }); - } - - [string] GetNextcloudConfigFile() { - return "$env:APPDATA/Nextcloud/nextcloud.cfg"; - } - - [void] AddNextcloudSync([string] $localPath, [string] $targetPath) { - $this.AddNextcloudSync($localPath, $targetPath, $false); - } - - [void] AddNextcloudSync([string] $localPath, [string] $targetPath, [bool] $virtualFiles) { - Write-Host "Adding a Nextcloud sync"; - Write-Information "$targetPath <=> $localPath"; - $pattern = "^\d+\\Folders(?:WithPlaceholders)?\\(\d+)"; - - $folderID = ( - Get-Content $($this.GetNextcloudConfigFile()) | ` - Where-Object { $_ -match "$pattern" } | ` - ForEach-Object { $_ -replace "$pattern.*$","`$1" } | ` - Sort-Object -Unique | ` - Measure-Object -Maximum).Maximum + 1; - - $configName = "Folders"; - $localPath = $localPath.Replace("\", "/"); - $targetPath = $targetPath.Replace("\", "/"); - - if ($virtualFiles) { - $configName += "WithPlaceholders"; - } - - Write-Information "Stopping Nextcloud process"; - $nextcloudProcess = Get-Process nextcloud; - $nextcloudPath = [string]$nextcloudProcess[0].Path; - $nextcloudProcess | Stop-Process -Force; - - $accountSectionEntered = $false; - $accountSectionLeft = $false; - - $newSettings = [string]::Join( - "`n", - @( - "0\$configName\$folderID\localPath=$localPath", - "0\$configName\$folderID\targetPath=$targetPath")); - - $oldContent = Get-Content ($this.GetNextcloudConfigFile()); - - $( - for ($i = 0; $i -lt $oldContent.Count; $i++) { - $line = $oldContent[$i]; - - if ($line -eq "[Accounts]") { - $accountSectionEntered = $true; - } - - if ($line -eq "" -and $accountSectionEntered) { - $accountSectionLeft = $true; - $newSettings; - } - - $line; - - if ( - (-not $accountSectionLeft) -and - ($i -eq ($oldContent.Count - 1))) - { - $newSettings; - } - }) | Set-Content ($this.GetNextcloudConfigFile()); - - Write-Information "New nextcloud config:"; - Write-Information (Get-Content $($this.GetNextcloudConfigFile()) | Out-String); - - Write-Information "Restarting Nextcloud"; - Start-Process $nextcloudPath; - } - - [void] Reboot() { - Write-Host "Restarting Computer..."; - $this.RegisterReboot(); - Restart-Computer -Force; - exit; - } - - [void] PreventSleepMode() { - $performanceScheme = "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c"; - $currentScheme = [regex]::Match((powercfg /GETACTIVESCHEME), "Power Scheme GUID: ([0-9a-f-]+) ").Groups[1].Value; - - if ($currentScheme -ne $performanceScheme) { - Write-Information "Disabling Power Save mode"; - $this.Set("Power Scheme", $currentScheme); - powercfg /S 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c; - } - } - - [void] Cleanup() { - $this.DeregisterNewUserReboot(); - $this.RemoveAutologin(); - $this.SetUACState($true); - $originalScheme = $this.Get("Power Scheme"); - Remove-Item $($this.EnsureConfigKey().PSPath); - - if ($originalScheme) { - Write-Information "Reset power plan to original state"; - powercfg /S $originalScheme; - } - } -} diff --git a/scripts/Common/Scripts/Entrypoints.ps1 b/scripts/Common/Scripts/Entrypoints.ps1 deleted file mode 100644 index ed2cfcc5..00000000 --- a/scripts/Common/Scripts/Entrypoints.ps1 +++ /dev/null @@ -1,14 +0,0 @@ -function Get-Entrypoint() { - $trace = Get-PSCallStack - $call = $trace[$trace.Count - 1]; - - if ($null -ne $call.ScriptName) { - return $call.ScriptName; - } else { - $call = $CallStack[$CallStack.Count - 2]; - return $call.ScriptName; - } - - - throw "No PowerShell entry point script could be found."; -} \ No newline at end of file diff --git a/scripts/Common/Scripts/SoftwareManagement.ps1 b/scripts/Common/Scripts/SoftwareManagement.ps1 index 23ad951c..3689438a 100644 --- a/scripts/Common/Scripts/SoftwareManagement.ps1 +++ b/scripts/Common/Scripts/SoftwareManagement.ps1 @@ -1,31 +1,3 @@ -function Install-SoftwarePackage($context, [string] $location, [string[]] $argumentList = @("/S"), [switch]$local) { - . "$PSScriptRoot/Context.ps1"; - [Context]$context = $context; - [string]$filePath = ""; - [string]$tempDir = $null; - - if (-not ($local.IsPresent)) { - $tempDir = $context.GetTempDirectory(); - Write-Information "Determining the file name of $location"; - $fileName = ([uri]$location).Segments[-1]; - Write-Information "$fileName"; - $filePath = Join-Path $tempDir $fileName; - - Write-Information "Downloading setup file from $location"; - Invoke-WebRequest $location -OutFile $filePath; - } else { - $filePath = $location; - } - - $fileName = [System.IO.Path]::GetFileName($filePath); - Write-Information "Starting installation of $fileName"; - Start-Process -Wait -FilePath $filePath -ArgumentList $argumentList; - - if ($tempDir) { - Remove-Item -Recurse $tempDir; - } -} - <# .SYNOPSIS Checks whether the specified package has been installed using Chocolatey. diff --git a/scripts/Common/Scripts/eval-module.fish b/scripts/Common/Scripts/eval-module.fish deleted file mode 100755 index 37056d8d..00000000 --- a/scripts/Common/Scripts/eval-module.fish +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/env fish -function evalModule --argument-names modulePath property - set -l argv $argv[3..] - - if not contains -- "--json" $argv - set -a argv --raw - end - - FILE=(realpath "$modulePath") \ - PROPERTY="$property" \ - nix eval --extra-experimental-features "nix-command flakes" \ - --file "$(status dirname)/../../../lib/eval-module.nix" \ - $argv -end diff --git a/scripts/Common/Scripts/hooks.sh b/scripts/Common/Scripts/hooks.sh deleted file mode 100755 index 06c104b0..00000000 --- a/scripts/Common/Scripts/hooks.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -function runHook() { - command="${@:2}"; - - function fallback() { - $command; - } - - if command -v $1 > /dev/null - then - $1 fallback; - else - fallback; - fi; -} diff --git a/scripts/Common/Scripts/profile-base.sh b/scripts/Common/Scripts/profile-base.sh deleted file mode 100755 index 41f7862f..00000000 --- a/scripts/Common/Scripts/profile-base.sh +++ /dev/null @@ -1,28 +0,0 @@ -function addProfileStatement() { - name="$1"; - title="$2"; - shellBin="$3"; - extension="$4"; - profileRoot="$5"; - - if [ ! -z "${@:6}" ] - then - statement="${@:6}"; - else - statement="$(cat)"; - fi; - - contextRoot="$(mktemp -d)"; - pushd "$contextRoot" > /dev/null; - - { - echo '#!'"$shellBin"; - echo "# $title"; - echo "$statement"; - } > "profile.$extension"; - - sudo install -Dm755 profile.$extension "$profileRoot/$name.$extension" - - popd > /dev/null; - rm -rf "$contextRoot"; -} diff --git a/scripts/Common/Software/Godot/install.sh b/scripts/Common/Software/Godot/install.sh deleted file mode 100755 index ae69fe7a..00000000 --- a/scripts/Common/Software/Godot/install.sh +++ /dev/null @@ -1,37 +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/4.0-stable/Godot_v4.0-stable_mono_linux_x86_64.zip -O "$archiveName"; - unzip "$archiveName" -d "$tempDir"; - mkdir -p "$destination"; - mv "$tempDir"/*/* "$destination"; - wget https://github.com/godotengine/godot/raw/4.0-stable/icon.svg -O "$destination/icon.svg"; - - rm -rf "$tempDir"; - rm -f "$archiveName"; - - exeFile="$(find "$destination" -maxdepth 1 -perm -111 -type f)"; - ln -fs "$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 diff --git a/scripts/Common/Software/JetBrains/install-toolbox.sh b/scripts/Common/Software/JetBrains/install-toolbox.sh deleted file mode 100755 index 76752537..00000000 --- a/scripts/Common/Software/JetBrains/install-toolbox.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -# Elevate script -if [ ! "$UID" -eq 0 ] -then - sudo bash "$BASH_SOURCE"; -else - contextRoot="$(mktemp -d)"; - pushd "$contextRoot" > /dev/null; - - curl -fsSL https://raw.githubusercontent.com/nagygergo/jetbrains-toolbox-install/1.1/jetbrains-toolbox.sh \ - | bash; - - popd > /dev/null; - 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 diff --git a/scripts/Common/Software/Oh My Posh/install.sh b/scripts/Common/Software/Oh My Posh/install.sh deleted file mode 100755 index 2eacd847..00000000 --- a/scripts/Common/Software/Oh My Posh/install.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -NEXTCLOUD_DIR="${NEXTCLOUD_DIR}"; - -# Elevate script -if [ ! "$UID" -eq 0 ] -then - sudo NEXTCLOUD_DIR="${NEXTCLOUD_DIR}" bash "$BASH_SOURCE" "$USER"; -else - bin=oh-my-posh; - contextRoot="$(mktemp -d)"; - pushd "$contextRoot" > /dev/null; - - wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -O "$bin"; - install "$bin" /usr/local/bin; - - popd > /dev/null; - rm -rf "$contextRoot"; -fi diff --git a/scripts/Common/Software/Woodpecker CLI/install.sh b/scripts/Common/Software/Woodpecker CLI/install.sh deleted file mode 100755 index b6026d5b..00000000 --- a/scripts/Common/Software/Woodpecker CLI/install.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -# Elevate script -if [ ! "$UID" -eq 0 ] -then - sudo bash "$BASH_SOURCE"; -else - contextRoot="$(mktemp -d)"; - pushd "$contextRoot" > /dev/null; - - # 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; - - popd > /dev/null; - rm -rf "$contextRoot"; -fi diff --git a/scripts/Common/Software/gnome-shell-extension-installer/install.sh b/scripts/Common/Software/gnome-shell-extension-installer/install.sh deleted file mode 100755 index bfbcc06b..00000000 --- a/scripts/Common/Software/gnome-shell-extension-installer/install.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -contextRoot="$(mktemp -d)"; -commandName="gnome-shell-extension-installer"; -pushd "$contextRoot" > /dev/null; - -wget -O "$commandName" https://github.com/brunelli/gnome-shell-extension-installer/raw/master/gnome-shell-extension-installer; -sudo install "$commandName" /usr/local/bin; - -popd > /dev/null; -rm -rf "$contextRoot"; diff --git a/scripts/Common/Software/n/install.sh b/scripts/Common/Software/n/install.sh deleted file mode 100755 index ad01f2ff..00000000 --- a/scripts/Common/Software/n/install.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -if [ ! "$UID" -eq 0 ] -then - sudo bash "$BASH_SOURCE"; -else - npm install -g n; - n install latest; -fi; diff --git a/scripts/Common/Software/nuke-usb/install.sh b/scripts/Common/Software/nuke-usb/install.sh deleted file mode 100755 index 720aaa3e..00000000 --- a/scripts/Common/Software/nuke-usb/install.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; -sudo install -m 755 ./nuke-usb.sh /usr/local/bin/nuke-usb; -popd > /dev/null; diff --git a/scripts/Common/Software/pyenv/install.sh b/scripts/Common/Software/pyenv/install.sh deleted file mode 100755 index 1e9bd61c..00000000 --- a/scripts/Common/Software/pyenv/install.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; -curl https://pyenv.run | bash; -. "../../Config/pyenv/install.sh"; -popd > /dev/null; diff --git a/scripts/Common/Software/tea/install.sh b/scripts/Common/Software/tea/install.sh deleted file mode 100755 index 55b6bd45..00000000 --- a/scripts/Common/Software/tea/install.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -# Elevate script -if [ ! "$UID" -eq 0 ] -then - sudo bash "$BASH_SOURCE"; -else - contextRoot="$(mktemp -d)"; - pushd "$contextRoot" > /dev/null; - - wget https://dl.gitea.io/tea/0.9.0/tea-0.9.0-linux-amd64 -O tea; - install tea /usr/local/bin; - - popd > /dev/null; - rm -rf "$contextRoot"; -fi diff --git a/scripts/Common/Software/zoxide/install.ps1 b/scripts/Common/Software/zoxide/install.ps1 deleted file mode 100644 index 518f81b3..00000000 --- a/scripts/Common/Software/zoxide/install.ps1 +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../PowerShell/Profile.ps1"; - -Add-PowerShellProfileStatement ` - -System ` - -Category "zoxide" ` - -Script $( - @( - "# zoxide", - $(Get-ScriptInitializer "zoxide init powershell | Out-String") - ) -join [System.Environment]::NewLine - ) diff --git a/scripts/Debian/Config/Fonts/MicrosoftFonts/install.sh b/scripts/Debian/Config/Fonts/MicrosoftFonts/install.sh deleted file mode 100755 index 6e9b05c5..00000000 --- a/scripts/Debian/Config/Fonts/MicrosoftFonts/install.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; -sudo apt install -y p7zip-full libgumbo-dev libexpat1-dev libfuse-dev libssl-dev libcurl4-openssl-dev uuid-dev; -. "../../../../Common/Config/Fonts/MicrosoftFonts/install.sh"; -popd > /dev/null; diff --git a/scripts/Debian/Drivers/Surface/LinuxSurface/install.sh b/scripts/Debian/Drivers/Surface/LinuxSurface/install.sh deleted file mode 100755 index c5da58ed..00000000 --- a/scripts/Debian/Drivers/Surface/LinuxSurface/install.sh +++ /dev/null @@ -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 diff --git a/scripts/Debian/Drivers/SurfaceBook2/Camera/install.sh b/scripts/Debian/Drivers/SurfaceBook2/Camera/install.sh deleted file mode 100755 index 86385686..00000000 --- a/scripts/Debian/Drivers/SurfaceBook2/Camera/install.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -contextRoot="$(mktemp -d)"; -pushd "$contextRoot" > /dev/null; - -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; - -popd > /dev/null; -rm -rf "$contextRoot"; diff --git a/scripts/Debian/Drivers/SurfaceBook2/SecureBoot/install.sh b/scripts/Debian/Drivers/SurfaceBook2/SecureBoot/install.sh deleted file mode 100755 index 7573d7ed..00000000 --- a/scripts/Debian/Drivers/SurfaceBook2/SecureBoot/install.sh +++ /dev/null @@ -1,109 +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 - contextRoot="$(mktemp -d)"; - packageName="shim.rpm"; - pushd "$contextRoot" > /dev/null; - - # 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"; - efiDirName="/EFI"; - bootDirName="$efiDirName/BOOT"; - microsoftDirName="$efiDirName/Microsoft/Boot"; - systemdDirName="$efiDirName/systemd"; - - shimBaseName="shimx64.efi"; - mokManagerBaseName="mmx64.efi"; - keyToolBaseName="KeyTool.efi"; - shellBaseName="Shell.efi"; - - defaultFileName="$bootDirName/BOOTx64.efi"; - systemdFileName="$systemdDirName/systemd-bootx64.efi"; - grubFileName="$bootDirName/grubx64.efi"; - mokManagerFileName="$bootDirName/$mokManagerBaseName"; - keyToolFileName="$systemdDirName/$keyToolBaseName"; - shellFileName="$systemdDirName/$shellBaseName"; - - espPath=/boot/efi; - bootPath="$espPath$bootDirName"; - defaultPath="$esp$defaultFileName"; - microsoftPath="$espPath$microsoftDirName"; - systemdPath="$espPath$systemdDirName/systemd-bootx64.efi"; - shellPath="$espPath$shellFileName"; - grubPath="$espPath$grubFileName"; - - # Set up files - cp "$systemdPath" "$grubPath"; - cp "$src/$shimBaseName" "$defaultPath"; - cp "$src/$mokManagerBaseName" "$bootPath"; - 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 "$shellPath"; - - { - 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 "$grubPath"; - - # Add boot entries - efibootmgr --unicode --disk /dev/nvme0n1 --part 0 --create --label "Shim" --loader "$defaultFileName"; - - # Configure systemd-boot - { - echo "timeout 4"; - } >> /boot/efi/loader/loader.conf; - - { - echo "title MokManager"; - echo "efi $mokManagerFileName"; - } > /boot/efi/loader/entries/MokManager.conf; - - { - echo "title KeyTool"; - echo "efi $keyToolFileName"; - } > /boot/efi/loader/entries/KeyTool.conf; - - { - echo "title UEFI Shell"; - echo "efi $shellFileName"; - } > /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 - popd > /dev/null; - rm -rf "$contextRoot"; -fi diff --git a/scripts/Debian/Drivers/SurfaceBook2/SecureBoot/openssl.cnf b/scripts/Debian/Drivers/SurfaceBook2/SecureBoot/openssl.cnf deleted file mode 100644 index 7cce4716..00000000 --- a/scripts/Debian/Drivers/SurfaceBook2/SecureBoot/openssl.cnf +++ /dev/null @@ -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" diff --git a/scripts/Debian/Drivers/SurfaceBook2/SecureBoot/sign-modules.sh b/scripts/Debian/Drivers/SurfaceBook2/SecureBoot/sign-modules.sh deleted file mode 100755 index 02b6c0a9..00000000 --- a/scripts/Debian/Drivers/SurfaceBook2/SecureBoot/sign-modules.sh +++ /dev/null @@ -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 diff --git a/scripts/Debian/Drivers/SurfaceBook2/Setup/install.sh b/scripts/Debian/Drivers/SurfaceBook2/Setup/install.sh deleted file mode 100755 index 519f7b48..00000000 --- a/scripts/Debian/Drivers/SurfaceBook2/Setup/install.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; - -# Install surface-linux -source "../../Surface/LinuxSurface/install.sh"; -source "../Camera/install.sh"; -# source "../SecureBoot/install.sh"; -popd > /dev/null; diff --git a/scripts/Debian/Software/Brave/install-beta.sh b/scripts/Debian/Software/Brave/install-beta.sh deleted file mode 100755 index fd6c5ed5..00000000 --- a/scripts/Debian/Software/Brave/install-beta.sh +++ /dev/null @@ -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 diff --git a/scripts/Debian/Software/Brave/install-nightly.sh b/scripts/Debian/Software/Brave/install-nightly.sh deleted file mode 100755 index 3df1f08b..00000000 --- a/scripts/Debian/Software/Brave/install-nightly.sh +++ /dev/null @@ -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 diff --git a/scripts/Debian/Software/Brave/install-stable.sh b/scripts/Debian/Software/Brave/install-stable.sh deleted file mode 100755 index 257a2fb8..00000000 --- a/scripts/Debian/Software/Brave/install-stable.sh +++ /dev/null @@ -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 diff --git a/scripts/Debian/Software/Google Chrome/install.sh b/scripts/Debian/Software/Google Chrome/install.sh deleted file mode 100755 index 15b43a5e..00000000 --- a/scripts/Debian/Software/Google Chrome/install.sh +++ /dev/null @@ -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 diff --git a/scripts/Debian/Software/Java/install.sh b/scripts/Debian/Software/Java/install.sh deleted file mode 100755 index 32dd1628..00000000 --- a/scripts/Debian/Software/Java/install.sh +++ /dev/null @@ -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 "~/.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 diff --git a/scripts/Debian/Software/Pipenv/install.sh b/scripts/Debian/Software/Pipenv/install.sh deleted file mode 100755 index e3d31ed8..00000000 --- a/scripts/Debian/Software/Pipenv/install.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -sudo apt install -y pipenv; diff --git a/scripts/Debian/Software/Python/install.sh b/scripts/Debian/Software/Python/install.sh deleted file mode 100755 index ebf2afd9..00000000 --- a/scripts/Debian/Software/Python/install.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -sudo apt install -y python3 python-is-python3 python3-pip; diff --git a/scripts/Debian/Software/VSCodium/install.sh b/scripts/Debian/Software/VSCodium/install.sh deleted file mode 100755 index fd141fa9..00000000 --- a/scripts/Debian/Software/VSCodium/install.sh +++ /dev/null @@ -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 diff --git a/scripts/Debian/Software/Virtual Machine Manager/install.sh b/scripts/Debian/Software/Virtual Machine Manager/install.sh deleted file mode 100755 index 7afefc2b..00000000 --- a/scripts/Debian/Software/Virtual Machine Manager/install.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -contextRoot="$(mktemp -d)"; -pushd "$contextRoot" > /dev/null; -sudo apt install -y swtpm swtpm-tools lxc libvirt-daemon-driver-lxc libvirt-daemon-system virt-manager; - -sudo apt install -y python3 python-is-python3 python3-guestfs python3-passlib; -git clone https://github.com/virt-manager/virt-bootstrap; -cd virt-bootstrap; -sudo python setup.py install; -popd > /dev/null; -rm -rf "$contextRoot"; diff --git a/scripts/Debian/Software/Visual Studio Code/install.sh b/scripts/Debian/Software/Visual Studio Code/install.sh deleted file mode 100755 index 4b1dafd9..00000000 --- a/scripts/Debian/Software/Visual Studio Code/install.sh +++ /dev/null @@ -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 diff --git a/scripts/Debian/Software/cloudflared/install.sh b/scripts/Debian/Software/cloudflared/install.sh deleted file mode 100755 index a2213b94..00000000 --- a/scripts/Debian/Software/cloudflared/install.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -# Elevate script -if [ ! "$UID" -eq 0 ] -then - sudo bash "$BASH_SOURCE" "$USER"; -else - package="$(mktemp)"; - wget https://github.com/cloudflare/cloudflared/releases/download/2023.3.0/cloudflared-linux-amd64.deb -O "$package"; - dpkg -i "$package"; - rm -f "$package"; -fi diff --git a/scripts/Debian/Software/common-apt/install.sh b/scripts/Debian/Software/common-apt/install.sh deleted file mode 100755 index dad0b482..00000000 --- a/scripts/Debian/Software/common-apt/install.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -# Elevate script -if [ ! "$UID" -eq 0 ] -then - sudo bash "$BASH_SOURCE"; -else - apt install -y \ - docker.io \ - docker-compose \ - screen \ - steam \ - vim; -fi diff --git a/scripts/Debian/Software/git/flow.sh b/scripts/Debian/Software/git/flow.sh deleted file mode 100755 index c38a1cfa..00000000 --- a/scripts/Debian/Software/git/flow.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -sudo apt install git-flow diff --git a/scripts/Debian/Software/git/install.sh b/scripts/Debian/Software/git/install.sh deleted file mode 100755 index c8ee4dc5..00000000 --- a/scripts/Debian/Software/git/install.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; -source "./flow.sh"; -source "./lfs.sh"; -popd > /dev/null; diff --git a/scripts/Debian/Software/git/lfs.sh b/scripts/Debian/Software/git/lfs.sh deleted file mode 100755 index ab912a9e..00000000 --- a/scripts/Debian/Software/git/lfs.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -sudo apt install git-lfs diff --git a/scripts/Debian/Software/logo-ls/install.sh b/scripts/Debian/Software/logo-ls/install.sh deleted file mode 100755 index 32610b3b..00000000 --- a/scripts/Debian/Software/logo-ls/install.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -# Elevate script -if [ ! "$UID" -eq 0 ] -then - pushd "${BASH_SOURCE%/*}" > /dev/null; - sudo bash "$BASH_SOURCE" "$USER"; - . "../../../Common/Config/logo-ls/install.sh"; - popd > /dev/null; -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"; -fi diff --git a/scripts/Debian/Software/rclone/install.sh b/scripts/Debian/Software/rclone/install.sh deleted file mode 100755 index 18465452..00000000 --- a/scripts/Debian/Software/rclone/install.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -# Elevate script -pushd "${BASH_SOURCE%/*}" > /dev/null; - -if [ ! "$UID" -eq 0 ] -then - sudo bash "$BASH_SOURCE"; - source "../../../Common/Config/rclone/install.sh"; -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"; -fi - -popd; diff --git a/scripts/NixOS/OS/setup.sh b/scripts/NixOS/OS/setup.sh deleted file mode 100755 index 9f5452af..00000000 --- a/scripts/NixOS/OS/setup.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; - -NIXOS_DISK="${NIXOS_DISK}"; -NIXOS_HOSTNAME="${NIXOS_HOSTNAME}"; -NIXOS_MOUNT_ROOT="${NIXOS_MOUNT_ROOT:-"/mnt"}"; -NIXOS_CONFIG_REPOSITORY="${NIXOS_CONFIG_REPOSITORY:-"https://git.nuth.ch/manuth/NixOSConfig"}"; -OS_LABEL="${OS_LABEL:-NixOS}"; - -OS_MOUNT_ROOT="${NIXOS_MOUNT_ROOT}" \ -OS_DISK="${NIXOS_DISK}" \ -OS_LABEL="${OS_LABEL}" \ -BOOT_MOUNTPOINT="/boot/efi" \ - . "../../Common/OS/partition.sh"; - -configRoot="$NIXOS_MOUNT_ROOT/etc/nixos"; -mkdir -p "$configRoot"; -git clone "$NIXOS_CONFIG_REPOSITORY" "$configRoot"; -cd "$configRoot"; -nixos-install --flake ".#$NIXOS_HOSTNAME"; - -popd > /dev/null; diff --git a/scripts/PopOS/Collections/personal.sh b/scripts/PopOS/Collections/personal.sh deleted file mode 100755 index 6ae3eca6..00000000 --- a/scripts/PopOS/Collections/personal.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; - -source "../../Debian/Software/rclone/install.sh"; - -# Install Brave -source "../../Debian/Software/Brave/install-stable.sh"; -# source "../../Debian/Software/Brave/install-beta.sh"; -# source "../../Debian/Software/Brave/install-nightly.sh"; - -BROWSER_BIN="brave-browser" \ -EXTENSION_DIR=/usr/share/brave-extensions \ -EXTENSION_POLICY_DIR=/opt/brave.com/brave/extensions \ - source "../../Common/Software/Chromium/ytmdl.sh"; - -source "../../Debian/Software/Google Chrome/install.sh"; - -# Install further software -source "../../Common/Software/Oh My Posh/install.sh"; -source "../../Debian/Software/git/install.sh"; -source "../../Debian/Software/logo-ls/install.sh"; -source "../../Debian/Software/VSCodium/install.sh"; -source "../../Debian/Software/Visual Studio Code/install.sh"; -source "../../Common/Software/n/install.sh"; -source "../../Debian/Software/Python/install.sh"; -source "../../Common/Software/pyenv/install.sh"; -source "../../Debian/Software/Pipenv/install.sh"; -source "../../Common/Software/tea/install.sh"; -source "../../Common/Software/Godot/install.sh"; -source "../../Debian/Software/Virtual Machine Manager/install.sh"; -source "../../Common/Software/Woodpecker CLI/install.sh"; - -source "../../Common/Config/git/install.sh"; - -# Install General Packages from APT -source "../../Debian/Software/common-apt/install.sh"; - -# Install other flatpaks -flatpak install -y flathub com.bitwarden.desktop; -flatpak install -y flathub org.signal.Signal; -flatpak install -y flathub com.usebottles.bottles; -flatpak install -y flathub com.mattjakeman.ExtensionManager; -flatpak install -y flathub com.github.wwmm.easyeffects; -flatpak install -y flathub ch.threema.threema-web-desktop; -flatpak install -y flathub app.ytmdesktop.ytmdesktop; -flatpak install -y flathub com.github.tchx84.Flatseal; -popd > /dev/null; diff --git a/scripts/PopOS/Collections/school.sh b/scripts/PopOS/Collections/school.sh deleted file mode 100755 index 96954984..00000000 --- a/scripts/PopOS/Collections/school.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; -source "./personal.sh"; - -source "../../Debian/Software/Java/install.sh"; -source "../../Debian/Software/cloudflared/install.sh"; -source "../../Common/Software/JetBrains/install-toolbox.sh"; - -. "../../Common/Config/udev/ct-board.sh"; - -# Install other flatpaks -flatpak install -y flathub com.github.xournalpp.xournalpp; -flatpak install -y flathub com.github.flxzt.rnote; -popd > /dev/null; diff --git a/scripts/PopOS/OS/install.sh b/scripts/PopOS/OS/install.sh deleted file mode 100755 index 76120af9..00000000 --- a/scripts/PopOS/OS/install.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; -source "../../Common/Config/GnomeExtensions/install.sh"; -popd > /dev/null; diff --git a/scripts/PopOS/Scripts/postinstall.sh b/scripts/PopOS/Scripts/postinstall.sh deleted file mode 100755 index f595763c..00000000 --- a/scripts/PopOS/Scripts/postinstall.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -sudo systemctl start packagekit; diff --git a/scripts/PopOS/Scripts/preinstall.sh b/scripts/PopOS/Scripts/preinstall.sh deleted file mode 100755 index 466c13aa..00000000 --- a/scripts/PopOS/Scripts/preinstall.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -sudo systemctl stop packagekit; -sudo apt update; -sudo apt upgrade -y; -sudo apt install dbus-x11; diff --git a/scripts/Unix/Config/KDE/input.sh b/scripts/Unix/Config/KDE/input.sh deleted file mode 100755 index c74c1335..00000000 --- a/scripts/Unix/Config/KDE/input.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -function addInputConfig() { - local configFile=/etc/xdg/kcminputrc; - local id1="$1"; - local id2="$2"; - local deviceName="$3"; - local statements="${@:4}"; - - if [ -z "$statements" ] - then - statements="$(cat)"; - fi; - - if ! { cat "$configFile" | grep "\\[$deviceName\\]"; } > /dev/null 2>&1 - then - { - if [ -f "$configFile" ] && [ -n "$(cat "$configFile")" ] - then - echo ""; - fi; - - echo "[Libinput][$id1][$id2][$deviceName]"; - echo "$statements"; - } | sudo tee "$configFile" > /dev/null; - fi; -} diff --git a/scripts/Unix/Config/aliae/install.sh b/scripts/Unix/Config/aliae/install.sh deleted file mode 100755 index fe8ab8f7..00000000 --- a/scripts/Unix/Config/aliae/install.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; -configPath="/etc/aliae/aliae.yml"; - -. "../../../Common/Config/aliae/install.sh"; -. "../../../Common/Config/fish/profile.sh"; -sudo install -Dm644 "../../../Common/Software/aliae/aliae.yml" "$configPath"; - -function dump_header() { - echo "# aliae"; -} - -function dump_bash() { - echo "#!/bin/bash"; - dump_header; -} - -{ - dump_bash; - echo "export ALIAE_CONFIG='$configPath'"; -} | sudo tee /etc/profile.d/aliae.sh > /dev/null; - -{ - echo "aliae init fish | source"; - echo "aliae completion fish | source"; -} | addFishProfile "aliae" "aliae"; - -popd > /dev/null; diff --git a/scripts/Unix/Devices/Logitech G903/install.sh b/scripts/Unix/Devices/Logitech G903/install.sh deleted file mode 100755 index 5fb3f101..00000000 --- a/scripts/Unix/Devices/Logitech G903/install.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; -. "../../Config/KDE/input.sh"; -addInputConfig "1133" "16519" "Logitech G903 LS" "PointerAccelerationProfile=1"; -popd > /dev/null; diff --git a/scripts/Unix/Devices/Surface Book 2/install.sh b/scripts/Unix/Devices/Surface Book 2/install.sh deleted file mode 100755 index 0064f68d..00000000 --- a/scripts/Unix/Devices/Surface Book 2/install.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -pushd "${BASH_SOURCE%/*}" > /dev/null; -. "../../Config/KDE/input.sh"; -addInputConfig "1118" "2338" "Microsoft Surface Keyboard Touchpad" "NaturalScroll=true"; -popd > /dev/null; diff --git a/scripts/Windows/Collections/Generic.ps1 b/scripts/Windows/Collections/Generic.ps1 deleted file mode 100644 index 1bcb5089..00000000 --- a/scripts/Windows/Collections/Generic.ps1 +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../Software/Firefox/Install.ps1"; -. "$PSScriptRoot/../Software/git/Install.ps1"; -. "$PSScriptRoot/../Software/LGHub/Install.ps1"; -. "$PSScriptRoot/../Software/ManiaPlanet/Install.ps1"; -. "$PSScriptRoot/../Software/osu!/Install.ps1"; -. "$PSScriptRoot/../Software/osu!lazer/Install.ps1"; -. "$PSScriptRoot/../Software/PuTTY/Install.ps1"; -. "$PSScriptRoot/../Software/RetroArch/Install.ps1"; -. "$PSScriptRoot/../Software/reWASD/Install.ps1"; -. "$PSScriptRoot/../Software/TrackMania Nations Forever/Install.ps1"; -. "$PSScriptRoot/../Software/TrackMania United Forever/Install.ps1"; -. "$PSScriptRoot/../Software/VisualStudio/Install.ps1"; -. "$PSScriptRoot/../../Common/Scripts/Context.ps1"; -. "$PSScriptRoot/../../Common/Scripts/SoftwareManagement.ps1"; - -function Backup-GenericApps([Context] $context) { - Backup-Git $context; - Backup-PuTTY $context; -} - -function Restore-GenericApps([Context] $context) { - # Device specific - if ((Get-Command Install-PersonalDrivers -ErrorAction SilentlyContinue)) { - Write-Information "Driver installation function was found. Starting installation"; - Install-PersonalDrivers $context; - } - - # Backed up applications - Restore-Git $context; - Restore-PuTTY $context; - - # Essentials - choco install -y zoxide; - winget install --accept-source-agreements --accept-package-agreements -e --id junegunn.fzf; - . "$PSScriptRoot/../../Common/Config/zoxide/install.ps1"; - - # Design - choco install -y ` - nerd-fonts-CascadiaCode; - - # Browsing - Install-Firefox $context; - . "$PSScriptRoot/../Software/MSEdgeRedirect/Install.ps1"; - - winget install --accept-source-agreements --accept-package-agreements -e --id Brave.Brave; - winget install --accept-source-agreements --accept-package-agreements -e --id kamranahmedse.pennywise; - - $context.RemoveTaskbarItem("*Firefox*"); - $context.RemoveDesktopIcon("*Brave*"); - $context.RemoveTaskbarItem("*Brave*"); - $context.RemoveDesktopIcon("Pennywise*"); - - choco install -y ` - 7zip ` - chocolateygui ` - DefaultProgramsEditor ` - bitwarden ` - keepass ` - procexp ` - procmon ` - ; - - winget install --accept-source-agreements --accept-package-agreements -e --id KDE.KDEConnect; - winget install --accept-source-agreements --accept-package-agreements -e --id SomePythonThings.WingetUIStore - - # Media - choco install -y ` - k-litecodecpackmega ` - jellyfin-media-player ` - vlc ` - ; - - winget install --accept-source-agreements --accept-package-agreements -e --id Ytmdesktop.Ytmdesktop; - $context.RemoveDesktopIcon("YouTube Music*"); - $context.RemoveDesktopIcon("VLC*"); - - # Coding - choco install -y --params "/NoDesktopIcon" vscode; - choco install -y --params "/NoDesktopIcon /AssociateWithFiles" vscodium; - # winget install --scope machine --accept-source-agreements --accept-package-agreements -e --id VSCodium.VSCodium.Insiders --override '/VerySilent /MergeTasks="!runCode,quicklaunchicon,addcontextmenufiles,addcontextmenufolders,associatewithfiles,addtopath"'; - - refreshenv; - . "$PSScriptRoot/../Config/vscode/Install.ps1"; - - choco install -y ` - gh ` - github-desktop ` - ; - - $context.RemoveDesktopIcon("GitHub*"); - - choco install -y ` - python ` - visualstudio2019-workload-vctools ` - ; - - . "$PSScriptRoot/../Software/NVS/Install.ps1"; - $context.RemoveDesktopIcon("*Microsoft Edge*"); -} diff --git a/scripts/Windows/Collections/Personal.ps1 b/scripts/Windows/Collections/Personal.ps1 deleted file mode 100644 index b0146f9a..00000000 --- a/scripts/Windows/Collections/Personal.ps1 +++ /dev/null @@ -1,140 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/Generic.ps1"; -. "$PSScriptRoot/../Software/Firefox/Install.ps1"; -. "$PSScriptRoot/../Software/git/Install.ps1"; -. "$PSScriptRoot/../Software/LGHub/Install.ps1"; -. "$PSScriptRoot/../Software/ManiaPlanet/Install.ps1"; -. "$PSScriptRoot/../Software/osu!/Install.ps1"; -. "$PSScriptRoot/../Software/osu!lazer/Install.ps1"; -. "$PSScriptRoot/../Software/PuTTY/Install.ps1"; -. "$PSScriptRoot/../Software/RetroArch/Install.ps1"; -. "$PSScriptRoot/../Software/reWASD/Install.ps1"; -. "$PSScriptRoot/../Software/TrackMania Nations Forever/Install.ps1"; -. "$PSScriptRoot/../Software/TrackMania United Forever/Install.ps1"; -. "$PSScriptRoot/../Software/VisualStudio/Install.ps1"; -. "$PSScriptRoot/../../Common/Scripts/Context.ps1"; -. "$PSScriptRoot/../../Common/Scripts/SoftwareManagement.ps1"; - -function Backup-PersonalApps([Context] $context) { - Backup-GenericApps $context; - Backup-LogitechGHUB $context; - Backup-ManiaPlanet $context; - Backup-Osu $context; - Backup-OsuLazer $context; - Backup-RetroArch $context; - Backup-reWASD $context; - Backup-TmNations $context; - Backup-TmUnited $context; - Backup-VisualStudio $context; -} - -function Restore-PersonalApps([Context] $context) { - # Backed up applications - Restore-GenericApps $context; - Restore-LogitechGHUB $context; - Restore-TmNations $context; - Restore-TmUnited $context; - Restore-ManiaPlanet $context; - Restore-Osu $context; - Restore-OsuLazer $context; - Restore-RetroArch $context; - Restore-reWASD $context; - Restore-VisualStudio $context; - - # Social Media - choco install -y ` - signal ` - ; - - choco install -y ` - threema-desktop ` - element-desktop ` - teamspeak ` - ; - - winget install --accept-source-agreements --accept-package-agreements -e --id Discord.Discord; - - $context.RemoveDesktopIcon("*Discord*"); - $context.RemoveDesktopIcon("*Element*"); - $context.RemoveDesktopIcon("*TeamSpeak*"); - - # Tools - Install-SoftwarePackage $context "https://github.com/mRemoteNG/mRemoteNG/releases/download/2023.03.03-v1.77.3-nb/mRemoteNG-Installer-1.77.3.nb-1784.msi" @("/Quiet"); - - choco install -y ` - gimp ` - gpu-z ` - windirstat ` - winmerge ` - xmedia-recode ` - hwmonitor ` - qbittorrent ` - imgburn ` - inkscape ` - krita ` - MetaX ` - obs-studio ` - openvpn ` - ; - - winget install --accept-source-agreements --accept-package-agreements -e --id AntSoftware.AntRenamer; - - $context.RemoveDesktopIcon("GPU-Z*"); - $context.RemoveDesktopIcon("WinDirStat*"); - $context.RemoveDesktopIcon("*HWMonitor*"); - $context.RemoveDesktopIcon("ImgBurn*"); - $context.RemoveDesktopIcon("Inkscape*"); - $context.RemoveDesktopIcon("Krita*"); - $context.RemoveDesktopIcon("mRemoteNG*"); - $context.RemoveDesktopIcon("MetaX*"); - $context.RemoveDesktopIcon("OBS Studio*"); - - winget install --accept-source-agreements --accept-package-agreements -e --id AppWork.JDownloader; - $context.RemoveDesktopIcon("JDownloader*"); - - . "$PSScriptRoot/../Software/Ubiquiti UniFi Controller/Install.ps1" $context; - - # Coding - choco install -y --ignore-checksums ` - ida-free ` - ; - - $context.RemoveDesktopIcon("IDA *"); - - choco install -y ` - HxD ` - docker-desktop ` - imhex ` - dotpeek ` - ; - - $context.RemoveDesktopIcon("Docker*"); - - # Gaming - choco install -y goggalaxy; - - choco install --ignore-checksums -y ` - ubisoft-connect ` - ; - - choco install -y ` - epicgameslauncher ` - steam ` - ; - - winget install --accept-source-agreements --accept-package-agreements -e --id ElectronicArts.EADesktop; - - $context.RemoveDesktopIcon("*Ubisoft Connect*"); - $context.RemoveDesktopIcon("*Epic Games*"); - $context.RemoveDesktopIcon("*Steam*"); - $context.RemoveDesktopIcon("EA.*"); - - choco install -y rayman-controlpanel; - - # Emulation - choco install -y ` - ppsspp ` - ; - - $context.RemoveDesktopIcon("PPSSPP *-Bit*"); -} diff --git a/scripts/Windows/Config/Explorer/Install.ps1 b/scripts/Windows/Config/Explorer/Install.ps1 deleted file mode 100644 index 258a95c2..00000000 --- a/scripts/Windows/Config/Explorer/Install.ps1 +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/pwsh -param($context) -Write-Host "Configuring file explorer"; - -$action = { - param([Microsoft.Win32.RegistryKey] $userKey) - - $path = $userKey.PSPath; - Set-ItemProperty "$path\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "HideFileExt" -Value 0 -Type "DWord"; -} - -$context.ProcessDefaultUserKey($action); diff --git a/scripts/Windows/Config/Firefox/Install.ps1 b/scripts/Windows/Config/Firefox/Install.ps1 deleted file mode 100644 index 3bcf686a..00000000 --- a/scripts/Windows/Config/Firefox/Install.ps1 +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../../Scripts/AppAssociations.ps1"; - -Write-Host "Configuring Firefox"; -$progIdSuffix = "-308046B0AF4A39CB"; -$appName = "Firefox"; - -$extensions = @( - ".htm", - ".html", - ".svg", - ".xht", - ".xhtml" -); - -$schemes = @( - "http", - "https" -); - -Write-Information "Making Firefox the default browser"; - -foreach ($extension in $extensions) { - Set-DefaultAppAssociation $extension "FirefoxHTML$progIdSuffix" $appName; -} - -foreach ($scheme in $schemes) { - Set-DefaultAppAssociation $scheme "FirefoxURL$progIdSuffix" $appName; -} diff --git a/scripts/Windows/Config/MSEdgeRedirect/Install.ps1 b/scripts/Windows/Config/MSEdgeRedirect/Install.ps1 deleted file mode 100644 index b6f6db34..00000000 --- a/scripts/Windows/Config/MSEdgeRedirect/Install.ps1 +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/pwsh -$configPath = "HKLM:\SOFTWARE\Robert Maehl Software\MSEdgeRedirect"; -Set-ItemProperty $configPath -Name "NoBing" -Value 1; -Set-ItemProperty $configPath -Name "NoImgs" -Value 1; -Set-ItemProperty $configPath -Name "NoNews" -Value 1; -Set-ItemProperty $configPath -Name "NoPDFs" -Value 1; - -Set-ItemProperty $configPath -Name "Search" -Value "StartPage"; -Set-ItemProperty $configPath -Name "Images" -Value "Custom"; -Set-ItemProperty $configPath -Name "ImagePath" "https://startpage.com/sp/search?cat=images&query="; -Set-ItemProperty $configPath -Name "News" -Value "Google"; -Set-ItemProperty $configPath -Name "PDFApp" -Value "C:\Program Files\Mozilla Firefox\firefox.exe"; diff --git a/scripts/Windows/Config/OpenSSH/Install.ps1 b/scripts/Windows/Config/OpenSSH/Install.ps1 deleted file mode 100644 index 2921e20c..00000000 --- a/scripts/Windows/Config/OpenSSH/Install.ps1 +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/pwsh -param($context) - -Set-Service ssh-agent -StartupType AutomaticDelayedStart; diff --git a/scripts/Windows/Config/Terminal-Icons/Install.ps1 b/scripts/Windows/Config/Terminal-Icons/Install.ps1 deleted file mode 100644 index 095f25f3..00000000 --- a/scripts/Windows/Config/Terminal-Icons/Install.ps1 +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../../../Common/Software/PowerShell/Profile.ps1"; -Add-PowerShellProfileStatement -System -Category "Terminal-Icons" -Script 'Import-Module "Terminal-Icons";'; diff --git a/scripts/Windows/Config/Thunderbird/Install.ps1 b/scripts/Windows/Config/Thunderbird/Install.ps1 deleted file mode 100644 index cd439531..00000000 --- a/scripts/Windows/Config/Thunderbird/Install.ps1 +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../../Scripts/AppAssociations.ps1"; -$applicationName = "Thunderbird"; - -Write-Host "Configuring Thunderbird"; -Write-Information "Making Thunderbird the default Mail program"; -Set-DefaultAppAssociation "mailto" "Thunderbird.Url.mailto" $applicationName; -Set-DefaultAppAssociation ".eml" "ThunderbirdEML" $applicationName; diff --git a/scripts/Windows/Config/WinSCP/Install.ps1 b/scripts/Windows/Config/WinSCP/Install.ps1 deleted file mode 100644 index 89a4f28e..00000000 --- a/scripts/Windows/Config/WinSCP/Install.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../../Scripts/AppAssociations.ps1"; - -Write-Host "Configuring WinSCP"; -Write-Information "Making WinSCP the default FTP program"; -Set-DefaultAppAssociation "ftp" "WinSCP.Url" "WinSCP: SFTP, FTP, WebDAV, S3 and SCP client"; diff --git a/scripts/Windows/Config/Windows/Install.ps1 b/scripts/Windows/Config/Windows/Install.ps1 deleted file mode 100644 index a272052a..00000000 --- a/scripts/Windows/Config/Windows/Install.ps1 +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/pwsh -param($context) - -. "$PSScriptRoot/../../../Common/Scripts/Context.ps1"; - -[Context] $context = $context; -$tempDir = $context.GetTempDirectory(); -$startLayoutFile = "start.json"; -Push-Location "$tempDir"; - -Write-Information "Remove MSEdge Icon"; -$context.RemoveDesktopIcon("Microsoft Edge*"); - -Write-Host "Configuring Windows"; - -$action = { - param([Microsoft.Win32.RegistryKey] $userKey) - - $spacingProperty = "IconSpacing"; - $relativeKeyPath = "Control Panel\Desktop\WindowMetrics" - $keyPath = "$($userKey.PSPath)\$relativeKeyPath"; - Write-Information "Setting old-school Desktop Icon Size"; - Copy-ItemProperty "HKCU:\$relativeKeyPath" "$keyPath" "$spacingProperty"; - Rename-ItemProperty $keyPath $spacingProperty "_$spacingProperty"; - Set-ItemProperty $keyPath -Name $spacingProperty -Value "-1710" -Type "String"; - - Write-Information "Disabling Dynamic Lighting"; - $keyPath = "$($userKey.PSPath)\Software\Microsoft\Lighting"; - New-Item $keyPath; - Set-ItemProperty "$keyPath" -Name "AmbientLightingEnabled" -Value "0" -Type "DWord"; - - Write-Information "Disabling adware"; - $winKey = "$($userKey.PSPath)\Software\Microsoft\Windows\CurrentVersion"; - $contentDeliveryKey = "$winKey\ContentDeliveryManager"; - $cloudContentKey = "HKLM:\Software\Policies\Microsoft\Windows\CloudContent"; - - foreach ($key in @($contentDeliveryKey, $cloudContentKey)) { - if (-not (Test-Path $key)) { - $null = New-Item $key; - } - } - - # Set-ItemProperty "$cloudContentKey" -Name "DisableWindowsConsumerFeatures" -Value 1 -Type "DWord"; - Set-ItemProperty "$cloudContentKey" -Name "DisableCloudOptimizedContent" -Value 1 -Type "DWord"; - Set-ItemProperty "$cloudContentKey" -Name "DisableConsumerAccountStateContent" -Value 1 -Type "DWord"; - Set-ItemProperty "$winKey\Explorer\Advanced" -Name "TaskBarMn" -Value 0 -Type "DWord"; - Set-ItemProperty "$contentDeliveryKey" -Name "ContentDeliveryAllowed" -Value 0 -Type "DWord"; - Set-ItemProperty "$contentDeliveryKey" -Name "SilentInstalledAppsEnabled" -Value 0 -Type "DWord"; - Set-ItemProperty "$contentDeliveryKey" -Name "SystemPaneSuggestionsEnabled" -Value 0 -Type "DWord"; -} - -$context.ProcessDefaultUserKey($action); - -Write-Information "Remove ads from pinned apps"; -Export-StartLayout $startLayoutFile; - -$startLayout = Get-Content "$startLayoutFile" | ConvertFrom-Json -$originalProperty = "pinnedList"; - -$newLayout = $startLayout | Select-Object -ExpandProperty $originalProperty | Where-Object { - return -not ( - ($_.desktopAppLink -like "*Microsoft Edge*") -or - [System.Linq.Enumerable]::Any( - @( - "*MicrosoftOfficeHub*", - "*SpotifyMusic*", - "*WhatsApp*", - "*PrimeVideo*", - "*Netflix*", - "*Instagram*", - "*Clipchamp*", - "*Facebook*", - "*LinkedIn*"), - [System.Func[System.Object,bool]]{ - param($pattern) - return $_.packagedAppId -like "$pattern"; - })); -} - -$startLayout.PSObject.Properties.Remove($originalProperty); -$startLayout | Add-Member -NotePropertyName "originalProperty" -NotePropertyValue $newLayout; - -$startLayout | ConvertTo-Json -Compress | Set-Content "$env:SystemDrive\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.json"; - -Pop-Location; -Remove-Item -Recurse "$tempDir"; diff --git a/scripts/Windows/Config/aliae/Install.ps1 b/scripts/Windows/Config/aliae/Install.ps1 deleted file mode 100644 index ad1ca6a0..00000000 --- a/scripts/Windows/Config/aliae/Install.ps1 +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../../Scripts/BashScript.ps1"; -$configFile="$env:ProgramData/aliae/aliae.yml"; -Start-BashScript "bash `"$PSScriptRoot/../../../Common/Config/aliae/install.sh`""; - -$null = New-Item -Force $configFile; -Copy-Item -Force "$PSScriptRoot/../../../Common/Software/aliae/aliae.yml" $configFile; -[Environment]::SetEnvironmentVariable("ALIAE_CONFIG", $configFile, [System.EnvironmentVariableTarget]::Machine) diff --git a/scripts/Windows/Config/chocolatey/Install.ps1 b/scripts/Windows/Config/chocolatey/Install.ps1 deleted file mode 100644 index 865e23b5..00000000 --- a/scripts/Windows/Config/chocolatey/Install.ps1 +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/pwsh -powershell -c 'New-Item -Force $PROFILE'; -choco install -y --force chocolatey; -Copy-Item -Force (powershell -c '$PROFILE') $PROFILE; - -Push-Location ~; - -$files = @((powershell -c '$PROFILE'), $PROFILE) | ForEach-Object { Resolve-Path -Relative $_ }; - -foreach ($profileFile in $files) { - $fullName = "C:/Users/Default/$profileFile"; - $dirName = Split-Path -Parent $fullName; - - if (-not (Test-Path -PathType Container $dirName)) { - $null = New-Item -Force -ItemType Directory $dirName; - } - - Copy-Item -Force "~/$profileFile" $fullName; -} - -Pop-Location; - -Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"; diff --git a/scripts/Windows/Config/posh-git/Install.ps1 b/scripts/Windows/Config/posh-git/Install.ps1 deleted file mode 100644 index 003939ae..00000000 --- a/scripts/Windows/Config/posh-git/Install.ps1 +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../../../Common/Software/PowerShell/Profile.ps1"; -Write-Host "Configuring posh-git"; -Add-PowerShellProfileStatement -System -Category "posh-git" -Script 'Import-Module "posh-git";' diff --git a/scripts/Windows/Config/vscode/Install.ps1 b/scripts/Windows/Config/vscode/Install.ps1 deleted file mode 100644 index a4c13b76..00000000 --- a/scripts/Windows/Config/vscode/Install.ps1 +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../../Scripts/BashScript.ps1"; -Start-BashScript "bash `"$PSScriptRoot/../../../Common/Config/vscode/install.sh`""; diff --git a/scripts/Windows/Drivers/AMDChipsetX399/Install.ps1 b/scripts/Windows/Drivers/AMDChipsetX399/Install.ps1 deleted file mode 100644 index 1c7dd5b8..00000000 --- a/scripts/Windows/Drivers/AMDChipsetX399/Install.ps1 +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/pwsh -param($context) -. "$PSScriptRoot/../../Scripts/AmdSoftwarePackage.ps1"; - -Install-AmdSoftwarePackage $context "https://www.amd.com/en/support/chipsets/amd-socket-tr4/x399"; diff --git a/scripts/Windows/Drivers/Predator Z301C/Install.ps1 b/scripts/Windows/Drivers/Predator Z301C/Install.ps1 deleted file mode 100644 index 4eaeab48..00000000 --- a/scripts/Windows/Drivers/Predator Z301C/Install.ps1 +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/pwsh -param($context) - - -. "$PSScriptRoot/../../../Common/Scripts/Context.ps1"; -[Context]$context = $context; - -$tempDir = $context.GetTempDirectory(); -$fileName = "driver.zip"; -Push-Location $tempDir; - -Invoke-WebRequest "https://global-download.acer.com/GDFiles/Driver/Monitor/Monitor_Acer_1.0_W7x86W7x64W8x86W8x64_A.zip?acerid=636092441703392074" -OutFile $fileName; -Expand-Archive $fileName; -Start-Process -Wait -FilePath "pnputil" -ArgumentList ([string[]]@("/add-driver", "*.inf", "/install", "/subdirs")); - -Pop-Location; -Remove-Item -Recurse $tempDir; diff --git a/scripts/Windows/Drivers/ROG Zenith Extreme Alpha/AMDChipsetX399/Install.ps1 b/scripts/Windows/Drivers/ROG Zenith Extreme Alpha/AMDChipsetX399/Install.ps1 deleted file mode 100644 index fd45b594..00000000 --- a/scripts/Windows/Drivers/ROG Zenith Extreme Alpha/AMDChipsetX399/Install.ps1 +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/pwsh -param($context) -. "$PSScriptRoot/../../../Scripts/AsusSoftwarePackage.ps1"; -Install-AsusSoftwarePackage $context "https://dlcdnets.asus.com/pub/ASUS/mb/03CHIPSET/DRV_Chipset_AMD_TRX40_TP_TSD_W10_64_V30901140_20211006R.zip?model=ROG%20ZENITH%20EXTREME%20ALPHA"; diff --git a/scripts/Windows/Drivers/ROG Zenith Extreme Alpha/IntelBluetooth/Install.ps1 b/scripts/Windows/Drivers/ROG Zenith Extreme Alpha/IntelBluetooth/Install.ps1 deleted file mode 100644 index d7b4c4fa..00000000 --- a/scripts/Windows/Drivers/ROG Zenith Extreme Alpha/IntelBluetooth/Install.ps1 +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/pwsh -param($context) -. "$PSScriptRoot/../../../Scripts/AsusSoftwarePackage.ps1"; -Install-AsusSoftwarePackage $context "https://dlcdnets.asus.com/pub/ASUS/mb/02BT/DRV_Bluetooth_Intel_9260_TP_W11_64_V2210002_20211222R.zip?model=ROG%20ZENITH%20EXTREME%20ALPHA"; diff --git a/scripts/Windows/Drivers/ROG Zenith Extreme Alpha/IntelWiFi/Install.ps1 b/scripts/Windows/Drivers/ROG Zenith Extreme Alpha/IntelWiFi/Install.ps1 deleted file mode 100644 index 26484914..00000000 --- a/scripts/Windows/Drivers/ROG Zenith Extreme Alpha/IntelWiFi/Install.ps1 +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/pwsh -param($context) -. "$PSScriptRoot/../../../Scripts/AsusSoftwarePackage.ps1"; -Install-AsusSoftwarePackage $context "https://dlcdnets.asus.com/pub/ASUS/mb/08WIRELESS/DRV_WiFi_Intel_TP_W11_64_V2219004_20230130R.zip?model=ROG%20ZENITH%20EXTREME%20ALPHA"; diff --git a/scripts/Windows/Drivers/ROG Zenith Extreme Alpha/MarvellEthernet/Install.ps1 b/scripts/Windows/Drivers/ROG Zenith Extreme Alpha/MarvellEthernet/Install.ps1 deleted file mode 100644 index 7db067f7..00000000 --- a/scripts/Windows/Drivers/ROG Zenith Extreme Alpha/MarvellEthernet/Install.ps1 +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/pwsh -param($context) -. "$PSScriptRoot/../../../Scripts/AsusSoftwarePackage.ps1"; -Install-AsusSoftwarePackage $context "https://dlcdnets.asus.com/pub/ASUS/mb/04LAN/DRV_LAN_Marvell_TP_TSD_W11_64_V3130_20211118R.zip?model=ROG%20ZENITH%20EXTREME%20ALPHA"; diff --git a/scripts/Windows/Drivers/Tobii EyeX/Install.ps1 b/scripts/Windows/Drivers/Tobii EyeX/Install.ps1 deleted file mode 100644 index 3fde2a88..00000000 --- a/scripts/Windows/Drivers/Tobii EyeX/Install.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -param($context) -. "$PSScriptRoot/../../../Common/Scripts/SoftwareManagement.ps1"; - -Write-Host "Installing Tobii Eye Tracking"; -Install-SoftwarePackage $context "https://files.update.tech.tobii.com/Tobii_Eye_Tracking_Core_v2.16.8.214_x86.exe"; diff --git a/scripts/Windows/OS/InitialBoot.ps1 b/scripts/Windows/OS/InitialBoot.ps1 deleted file mode 100644 index 5c8968a0..00000000 --- a/scripts/Windows/OS/InitialBoot.ps1 +++ /dev/null @@ -1,12 +0,0 @@ -[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; -Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')); - -Import-Module $env:ChocolateyInstall/helpers/chocolateyProfile.psm1; - -choco install -y git --params='/WindowsTerminalProfile /DefaultBranchName:main'; -choco install -y powershell-core --install-arguments='"ADD_FILE_CONTEXT_MENU_RUNPOWERSHELL=1 ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=1 REGISTER_MANIFEST=1 USE_MU=1 ENABLE_MU=1"'; -refreshenv; - -Set-Location C:/; -pwsh -Command { . ./scripts/Windows/Software/winget/install.ps1; Install-Winget }; -& "$env:INSTALLER_SCRIPT" diff --git a/scripts/Windows/OS/Legacy.ps1 b/scripts/Windows/OS/Legacy.ps1 deleted file mode 100644 index 9aba0acb..00000000 --- a/scripts/Windows/OS/Legacy.ps1 +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../Scripts/PersonalFiles.ps1"; -. "$PSScriptRoot/../Software/Firefox/Install.ps1"; -. "$PSScriptRoot/../Software/Nextcloud/Install.ps1"; -. "$PSScriptRoot/../Collections/Personal.ps1"; -. "$PSScriptRoot/../../Common/Scripts/Context.ps1"; - -function Backup-WindowsInstallation([Context] $context) { - Write-Information "Backing up Windows"; - $Global:InformationPreference = "Continue"; - $Global:ErrorActionPreference = "Inquire"; - . "$PSScriptRoot/../../../scripts/Windows/Scripts/Prerequisites.ps1"; - $backupRoot = $context.BackupRoot(); - Backup-PersonalFiles $context; - Backup-PersonalApps $context; - $context.Backup($backupRoot, "$backupRoot.7z", @("-sdel"), $false); - $context.Cleanup(); - Write-Host "Never forget to store the backup somewhere safe!"; - Write-Host "I mean... what kind of a dumbass would ever forget to do so, right?"; -} - -function Restore-WindowsInstallation([Context] $context) { - Write-Host "Restoring Windows"; - choco feature enable -n useEnhancedExitCodes; - - function Read-Path() - { - $backupPath = Read-Host -Prompt "Please enter the path to the archive to load the backup from."; - - if ($backupPath -and (-not (Test-Path -PathType Leaf $backupPath))) - { - Write-Host "No file could be found at the specified path."; - return Read-Path; - } - else - { - return $backupPath; - } - } - - Install-Firefox $context; - Restore-Nextcloud $context; - - Write-Information "Determining Backup Archive Path"; - $backupPath = Read-Path; - $context.BackupName ??= "PortValhalla"; - $context.RootDir = $context.GetTempDirectory(); - - if ($backupPath) - { - $context.Restore($backupPath, $context.BackupRoot()); - } - - Copy-UserInternationalSettingsToSystem -WelcomeScreen $True -NewUser $False; - Restore-PersonalFiles $context; - - if ((Get-Command Restore-Apps -ErrorAction SilentlyContinue)) { - Restore-Apps $context; - } - - Remove-Item -Recurse $context.RootDir; - $context.Cleanup(); -} diff --git a/scripts/Windows/OS/Manage.ps1 b/scripts/Windows/OS/Manage.ps1 index 6d59bd8f..5d715cb4 100644 --- a/scripts/Windows/OS/Manage.ps1 +++ b/scripts/Windows/OS/Manage.ps1 @@ -1,14 +1,8 @@ #!/bin/pwsh using namespace System.Security.Principal; -. "$PSScriptRoot/../Scripts/Prerequisites.ps1"; - -. "$PSScriptRoot/Legacy.ps1"; -. "$PSScriptRoot/User/Install.ps1"; . "$PSScriptRoot/../Scripts/Security.ps1"; . "$PSScriptRoot/../Scripts/WSL.ps1"; -. "$PSScriptRoot/../Software/Firefox/Install.ps1"; -. "$PSScriptRoot/../../Common/Scripts/Context.ps1"; $null = New-Module { . "$PSScriptRoot/../Scripts/Deployment.ps1"; @@ -244,110 +238,4 @@ $null = New-Module { } } } - - function Invoke-WindowsInstallation([Context] $context) { - $Global:InformationPreference = "Continue"; - $Global:ErrorActionPreference = "Inquire"; - $context.UserNames ??= @("Manuel"); - Start-OldWindowsInstallationScript $context; - } - - function Start-OldWindowsInstallationScript([Context] $context) { - . "$PSScriptRoot/Upgrade.ps1"; - $finished = $false; - Remove-Item Env:\POSH_THEME -ErrorAction SilentlyContinue; - $configPath = "$PSScriptRoot/../Config"; - $softwarePath = "$PSScriptRoot/../Software"; - $initialConfigStage = "InitialConfiguration"; - $prerequisitesStage = "InstallationPrerequisites"; - $driverStage = "DriverInstallation"; - $softwareStage = "MachineWideSoftwareInstallation"; - $userStage = "CreatingUser"; - $restorationStage = "Restoring"; - - - while (-not $finished) { - switch ($context.GetStage()) { - { (-not $_) -or ($_ -eq $initialConfigStage) } { - $context.SetStage($initialConfigStage); - - if ((Get-Command Initialize-Configuration -ErrorAction SilentlyContinue)) { - Write-Information "Configuration initialization function was found. Running..."; - Initialize-Configuration $context; - } - - $null = Enable-WindowsOptionalFeature -Online -All -FeatureName "NetFx3"; - - . "$configPath/Windows/Install.ps1" $context; - . "$configPath/Explorer/Install.ps1" $context; - . "$configPath/OpenSSH/Install.ps1" $context; - . "$configPath/chocolatey/Install.ps1"; - - $context.RemoveDesktopIcon("*Microsoft Edge*"); - $context.SetStage($prerequisitesStage); - break; - } - # Always install updates - default { - Write-Host "Starting Installation and Restoration of Windows"; - Update-WindowsInstallation $context; - } - $prerequisitesStage { - Write-Host "Installing prerequisites for installing software"; - - if (-not $(Get-Command winget)) { - choco install -y winget; - } - - Install-Module -AcceptLicense -Force "NuGet"; - Import-Module NuGet; - - Install-Firefox $context; - choco install -y selenium-gecko-driver; - $null = Install-Package -Force Selenium.WebDriver -RequiredVersion 4.10.0 -SkipDependencies; - - winget install --accept-source-agreements --accept-package-agreements -e --id AutoHotkey.AutoHotkey; - - $context.SetStage($driverStage); - break; - } - $driverStage { - Write-Host "Installing drivers"; - - if ((Get-Command Install-PortValhallaDrivers -ErrorAction SilentlyContinue)) { - Write-Information "Driver installation function was found. Starting installation"; - Install-PortValhallaDrivers $context; - } - - Write-Information "Finished installing drivers"; - $context.SetStage($softwareStage); - $context.Reboot(); - exit; - } - $softwareStage { - Write-Host "Setting up software with default app associations"; - . "$softwarePath/WinSCP/Install.ps1" $context; - . "$softwarePath/Thunderbird/Install.ps1" $context; - - Write-Host "Installing default settings for new users"; - . "$softwarePath/aliae/Install.ps1" $context; - . "$softwarePath/posh-git/Install.ps1"; - . "$softwarePath/Terminal-Icons/Install.ps1"; - . "$softwarePath/Oh My Posh/Install.ps1" $context; - $context.SetStage($userStage); - break; - } - $userStage { - Install-PersonalUsers $context; - $context.SetStage($restorationStage); - break; - } - $restorationStage { - Restore-WindowsInstallation $context; - $finished = $true; - break; - } - } - } - } }; diff --git a/scripts/Windows/OS/Upgrade.ps1 b/scripts/Windows/OS/Upgrade.ps1 deleted file mode 100644 index 2150c859..00000000 --- a/scripts/Windows/OS/Upgrade.ps1 +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../../Common/Scripts/Context.ps1"; - -function Update-WindowsInstallation([Context] $context) -{ - if (-not $context.GetUACState()) { - Write-Host "Upgrading Windows"; - Write-Host "Preparing for Windows Update"; - $null = Import-Module PSWindowsUpdate; - - Write-Host "Performing Windows Update"; - - try { - $null = Install-WindowsUpdate -AcceptAll -IgnoreReboot -ErrorAction "SilentlyContinue"; - } - catch { } - - if ((Get-WURebootStatus -Silent)) - { - Write-Information "A Reboot is Required!"; - Write-Information "Windows will reboot now and the installation will be continued automatically."; - $context.Reboot(); - exit; - } - elseif ( - ((Get-WindowsUpdate -IgnoreReboot).Count -gt 0) -and - ((Get-WindowsUpdate -IgnoreReboot).KB -ne "KB2267602")) - { - Write-Information "More updates are available. Restarting upgrade routine."; - $null = Update-WindowsInstallation $context; - return; - } - else - { - Write-Information "Upgrading Windows finished successfully!"; - return; - } - } -} diff --git a/scripts/Windows/OS/User/Add.ps1 b/scripts/Windows/OS/User/Add.ps1 deleted file mode 100644 index d38abeac..00000000 --- a/scripts/Windows/OS/User/Add.ps1 +++ /dev/null @@ -1,189 +0,0 @@ -#!/bin/pwsh -$contextScript = "$PSScriptRoot/../../../Common/Scripts/Context.ps1"; -. "$contextScript"; -$preparedUsernameProperty = "AutoLoginUser"; -$preparedPasswordProperty = "AutoLoginPassword"; -$autoLoginTriggerProperty = "AutoLoginTrigger"; -$uacDisablerTriggerProperty = "UACDisablerTrigger"; - -function New-PersonalUser([Context] $context, [string] $userName) -{ - $userStageProperty = "UserStage"; - $creationStage = "Create"; - $postProcessStage = "ReEnableFeatures"; - $adminRemovalStage = "RemoveAdmin"; - - function Get-UserStage() { - return $context.Get($userStageProperty); - } - - function Set-UserStage() { - param([string]$value); - $context.Set($userStageProperty, $value); - } - - switch (Get-UserStage) { - { (-not $_) -or ($_ -eq $creationStage) } { - Set-UserStage $creationStage; - - if (-not (Get-LocalUser $userName -ErrorAction SilentlyContinue)) { - Write-Host "Creating Personal User ``$userName``"; - - Get-LocalUser | Where-Object { $_.Name -in $context.UserNames } | - Disable-LocalUser; - - while ($true) { - Write-Host ( - [string]::Join( - "`n", - "So... Windows is too dumb to create users which are bound to a Microsoft Account.", - "Thus, you have to do it by yourself.", - "So sorry...")); - - $users = Get-LocalUser | ForEach-Object { $_.Name }; - Write-Host "Following users exist already:" - Write-Host $users; - Write-Host "Create a user for ``$userName`` manually" - Read-Host "Please hit enter once you're done..."; - - $user = Get-LocalUser | Where-Object { -not ($users -contains $_.Name) } | Select-Object -Last 1; - - if ($user) { - Write-Information "Found New User:"; - Write-Information $user; - break; - } - } - - Write-Information "Renaming the new User to $userName"; - Rename-LocalUser $user $userName; - - Add-LocalGroupMember -Group "Administrators" -Member $user && - Set-LocalUser $context.AdminName -Password (ConvertTo-SecureString -AsPlainText "Admin") && - Disable-LocalUser $context.AdminName; - - Write-Information "Disabling Auto login"; - $context.RemoveAutologin(); - Write-Host "Registering setup script for all new users"; - $context.RegisterNewUserReboot(); - Register-UserPostprocessingTasks $context; - Set-UserStage $postProcessStage; - Restart-Computer -Force; - exit; - } - } - $postProcessStage { - Enable-PersonalUserAutologon $context $userName; - Set-UserStage $adminRemovalStage; - Start-EventDrivenTask $context.Get($uacDisablerTriggerProperty); - $context.Reboot(); - exit; - } - $adminRemovalStage { - Write-Information "Removing Admin Account"; - Get-CimInstance -ClassName "Win32_UserProfile" -Filter "SID = '$((Get-LocalUser $context.AdminName).SID)'" | Remove-CimInstance; - $context.Remove($userStageProperty); - break; - } - } -} - -function Register-UserPostprocessingTasks([Context] $context) { - Write-Information "Enabling UAC for the next login (Microsoft Account login won't work otherwise, lol)"; - $context.SetUACState($true); - $tempTask = "PortValhalla Temp"; - $autoLoginName = "PortValhalla AutoLogin Setup"; - $uacDisablerName = "PortValhalla UAC Disabler"; - $autoLoginTrigger = Get-Random -Maximum 0xFFFF; - $uacDisablerTrigger = Get-Random -Maximum 0xFFFF; - - $context.Set($autoLoginTriggerProperty, $autoLoginTrigger, "DWord"); - $context.Set($uacDisablerTriggerProperty, $uacDisablerTrigger, "DWord"); - - Write-Information "Registering tasks for re-enabling autologon and re-enabling UAC on next login"; - - $optionCollection = [System.Tuple[int, string, string[]][]]@( - [System.Tuple]::Create( - $autoLoginTrigger, - $autoLoginName, - @( - ". `"$PSScriptRoot/AutoLogin.ps1`"", - " $autoLoginTrigger", - " '$preparedUsernameProperty'", - " '$preparedPasswordProperty'")), - [System.Tuple]::Create( - $uacDisablerTrigger, - $uacDisablerName, - @( - ". `"$PSScriptRoot/UACDisabler.ps1`"", - " $uacDisablerTrigger", - " '$autoLoginName'", - " '$uacDisablerName'", - " '$autoLoginTriggerProperty'", - " '$uacDisablerTriggerProperty'"))); - - foreach ($options in $optionCollection) { - $action = New-ScheduledTaskAction -Execute "pwsh.exe" -Argument ((@("-c") + $options.Item3) -join " "); - - schtasks /Create /SC ONEVENT /EC Application /MO "*[System[Provider[@Name='Application'] and EventID=$($options.Item1)]]" /TR cmd.exe /TN "$tempTask"; - $trigger = (Get-ScheduledTask $tempTask).Triggers; - $principal = New-ScheduledTaskPrincipal -UserId "SYSTEM" -RunLevel Highest; - $task = New-ScheduledTask -Action $action -Principal $principal -Trigger $trigger; - $null = Register-ScheduledTask $options.Item2 -InputObject $task; - $null = Unregister-ScheduledTask -Confirm:$false $tempTask; - } -} - -function Enable-PersonalUserAutologon([Context] $context, [string] $userName) -{ - Add-Type -assemblyname System.DirectoryServices.AccountManagement; - Write-Information "Re-Enabling Autologin for Current User"; - $principalContext = [System.DirectoryServices.AccountManagement.PrincipalContext]::new("Machine"); - - while ($true) - { - $password = Read-Host "Please enter the password of your Microsoft Account" -MaskInput; - - if ($principalContext.ValidateCredentials($userName, $password)) - { - break; - } - else { - Write-Error "The specified password is incorrect!"; - } - } - - $context.Set($preparedUsernameProperty, $userName); - $context.Set($preparedPasswordProperty, $password); - Start-EventDrivenTask $context.Get($autoLoginTriggerProperty); -} - -function Start-EventDrivenTask() { - param( - [int]$EventID - ); - - powershell -c { - param ( - [int]$EventID - ) - $identifier = "EventLog$EventID"; - $applicationLog = Get-EventLog -List | Where-Object { $_.Log -eq "Application" }; - - Register-ObjectEvent -InputObject $applicationLog -EventName EntryWritten -Action { - $entry = $event.SourceEventArgs.Entry; - - if ($entry.EventID -eq $EventID) { - $null = New-Event -SourceIdentifier $identifier; - } - }; - - $job = Start-Job { - Wait-Event -SourceIdentifier $identifier; - Wait-Event -SourceIdentifier $identifier; - }; - - Write-EventLog -LogName Application -Source "Application" -EventId $EventID -Message "This event was created by $env:Username"; - $null = Wait-Job $job; - } -args $EventID -} diff --git a/scripts/Windows/OS/User/AutoLogin.ps1 b/scripts/Windows/OS/User/AutoLogin.ps1 deleted file mode 100644 index 53c338fd..00000000 --- a/scripts/Windows/OS/User/AutoLogin.ps1 +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/pwsh -param( - [int]$EventID, - [string]$PreparedUsernameProperty, - [string]$PreparedSecretProperty -); - -. "$PSScriptRoot/../../../Common/Scripts/Context.ps1"; -$context = [Context]::new(); -$userName = $context.Get($PreparedUsernameProperty); -$password = $context.Get($PreparedSecretProperty); -$context.SetAutologin($userName, $password); -$context.Remove($PreparedUsernameProperty); -$context.Remove($PreparedSecretProperty); -Unregister-ScheduledTask -Confirm:$false $AutoLoginTaskName; -Write-EventLog -LogName Application -Source "Application" -EventId $EventID -Message "This event was created by $env:Username"; -$context.Remove($AutoLoginTriggerProperty); diff --git a/scripts/Windows/OS/User/Install.ps1 b/scripts/Windows/OS/User/Install.ps1 deleted file mode 100644 index bf24dd9f..00000000 --- a/scripts/Windows/OS/User/Install.ps1 +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../../../Common/Scripts/Context.ps1"; -. "$PSScriptRoot/Add.ps1"; - -function Install-PersonalUsers([Context] $context) { - $null = New-Module { - $userIDProperty = "User"; - - function Get-UserID { - return $context.Get($userIDProperty); - } - function Set-UserID { - param([int]$value); - $context.Set($userIDProperty, $value); - } - } - - $userID = Get-UserID; - - if ($null -eq $userID) { - Set-UserID ($context.UserNames.Count - 1); - $userID = Get-UserID; - } - - if ($userID -ge 0) { - New-PersonalUser $context $($context.UserNames[$userID]); - Set-UserID ($userID - 1); - } else { - Get-LocalUser | Where-Object { $_.Name -in $context.UserNames } | - Enable-LocalUser; - } -} diff --git a/scripts/Windows/OS/User/UACDisabler.ps1 b/scripts/Windows/OS/User/UACDisabler.ps1 deleted file mode 100644 index ad257d84..00000000 --- a/scripts/Windows/OS/User/UACDisabler.ps1 +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/pwsh -param ( - [int]$EventID, - [string]$AutoLoginTaskName, - [string]$UACDisablerTaskName, - [string]$AutoLoginTriggerProperty, - [string]$UACDisablerTriggerProperty -); - -. "$PSScriptRoot/../../../Common/Scripts/Context.ps1"; -$context = [Context]::new(); -$context.SetUACState($false); -Unregister-ScheduledTask -Confirm:$false $UACDisablerTaskName; -Write-EventLog -LogName Application -Source "Application" -EventId $EventID -Message "This event was created by $env:Username"; -$context.Remove($UACDisablerTriggerProperty); -$context.DeregisterNewUserReboot(); diff --git a/scripts/Windows/Scripts/AmdSoftwarePackage.ps1 b/scripts/Windows/Scripts/AmdSoftwarePackage.ps1 deleted file mode 100644 index e33a7a3a..00000000 --- a/scripts/Windows/Scripts/AmdSoftwarePackage.ps1 +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../../Common/Scripts/Context.ps1"; -. "$PSScriptRoot/../../Common/Scripts/BrowserAutomation.ps1"; - -function Install-AmdSoftwarePackage() { - param( - [Context] $context, - [string] $url - ) - - $tempDir = $context.GetTempDirectory(); - $cookieBannerSelector = "#onetrust-consent-sdk"; - $osSelector = ".os-group:first-of-type"; - $summarySelector = "$osSelector summary:first-of-type"; - $downloadSelector = "$osSelector .driver:first-of-type a:first-of-type"; - - $action = { - param([OpenQA.Selenium.Firefox.FirefoxDriver] $browser) - - $summary = $browser.FindElement([OpenQA.Selenium.By]::CssSelector($summarySelector)); - - if (-not ([bool]$summary.GetAttribute("aria-expanded"))) { - $summary.Click(); - } - - $downloader = { - param() - $browser.FindElement([OpenQA.Selenium.By]::CssSelector($downloadSelector)).Click(); - } - - try { - $downloader.Invoke(); - } catch { - $browser.ExecuteScript("document.querySelector('$cookieBannerSelector').remove()"); - $downloader.Invoke(); - } - } - - $file = Start-CustomBrowserDownload $context $url $action $tempDir; - - Start-Process -Wait -FilePath $file -ArgumentList "/S"; - Remove-Item -Recurse $tempDir; -} diff --git a/scripts/Windows/Scripts/AsusSoftwarePackage.ps1 b/scripts/Windows/Scripts/AsusSoftwarePackage.ps1 deleted file mode 100644 index d2216807..00000000 --- a/scripts/Windows/Scripts/AsusSoftwarePackage.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -. "$PSScriptRoot/../../Common/ScriptsContext.ps1"; - -function Install-AsusSoftwarePackage([Context] $context, [string] $url) { - $packageFile = "AsusPackage.zip"; - $tempDir = $context.GetTempDirectory(); - $null = Push-Location $tempDir; - $unpackedDir = $context.GetTempDirectory(); - Invoke-WebRequest $url -OutFile $packageFile; - Expand-Archive $packageFile $unpackedDir; - $null = Pop-Location; - Remove-Item -Recurse $tempDir; - - $null = Start-Process -Wait -FilePath "$(Join-Path $unpackedDir "AsusSetup.exe")" -ArgumentList "/S"; - Remove-Item -Recurse $unpackedDir; -} diff --git a/scripts/Windows/Scripts/BashScript.ps1 b/scripts/Windows/Scripts/BashScript.ps1 deleted file mode 100644 index 6fe660f9..00000000 --- a/scripts/Windows/Scripts/BashScript.ps1 +++ /dev/null @@ -1,16 +0,0 @@ -function Start-BashScript() { - param( - [Parameter(Mandatory=$true, Position=0)] - [string[]]$Content - ) - - Write-Information "Preparing setup script"; - $bashLocation = Join-Path (Split-Path -Parent (Split-Path -Parent (Get-Command git-gui).Source)) "git-bash"; - - $script = New-TemporaryFile; - $script = Rename-Item $script -NewName "$script.sh" -PassThru; - Set-Content $script ([string]::Join("`n", $Content)); - Write-Information "Running prepared script"; - Start-Process -Wait "$bashLocation" -ArgumentList @("$script"); - Remove-Item $script; -} diff --git a/scripts/Windows/Scripts/FileLists/Home.exclude.txt b/scripts/Windows/Scripts/FileLists/Home.exclude.txt deleted file mode 100644 index 1a611aec..00000000 --- a/scripts/Windows/Scripts/FileLists/Home.exclude.txt +++ /dev/null @@ -1,44 +0,0 @@ -Pictures/Feedback -Documents/BeamNG.drive -Documents/Default.rdp -Documents/den4b/ReNamer -Documents/Dolphin Emulator -Documents/eFisc -Documents/Eigene* -Documents/Games -Documents/IISExpress -Documents/KINGDOM HEARTS HD 1.5+2.5 ReMIX -Documents/ManiaPlanet -Documents/MetaX -Documents/MuseScore3 -Documents/My Games -Documents/My Music -Documents/My Pictures -Documents/My Videos -Documents/My Web Sites -Documents/OneNote-Notizbücher -Documents/PCSX2 -Documents/PowerShell -Documents/PPSSPP -Documents/PS Vita -Documents/PSV Packages -Documents/PSV Updates -Documents/Repositories -Documents/Rise of the Tomb Raider -Documents/S2 -Documents/SEGA -Documents/SEGA Mega Drive Classics -Documents/SQL Server Management Studio -Documents/Square Enix -Documents/TI-Nspire CX -Documents/TmForever -Documents/TrackMania -Documents/UltraVNC -Documents/Visual Studio 2017 -Documents/Visual Studio 2019 -Documents/Visual Studio 2022 -Documents/Viwizard M4V Converter -Documents/WindowsPowerShell -Documents/Zoom -Documents/reconnect.cmd -Music/iTunes diff --git a/scripts/Windows/Scripts/FileLists/Home.include.txt b/scripts/Windows/Scripts/FileLists/Home.include.txt deleted file mode 100644 index 3c8ed443..00000000 --- a/scripts/Windows/Scripts/FileLists/Home.include.txt +++ /dev/null @@ -1,5 +0,0 @@ -Pictures -Documents -Downloads -Music -Videos diff --git a/scripts/Windows/Scripts/FileLists/Public.exclude.txt b/scripts/Windows/Scripts/FileLists/Public.exclude.txt deleted file mode 100644 index f3f16eff..00000000 --- a/scripts/Windows/Scripts/FileLists/Public.exclude.txt +++ /dev/null @@ -1,6 +0,0 @@ -Documents/Eigene* -Documents/Hyper-V -Documents/reWASD -Documents/My Music -Documents/My Pictures -Documents/My Videos diff --git a/scripts/Windows/Scripts/FileLists/Public.include.txt b/scripts/Windows/Scripts/FileLists/Public.include.txt deleted file mode 100644 index 27641ffe..00000000 --- a/scripts/Windows/Scripts/FileLists/Public.include.txt +++ /dev/null @@ -1,5 +0,0 @@ -Documents -Pictures -Downloads -Music -Videos diff --git a/scripts/Windows/Scripts/KnownFolders.ps1 b/scripts/Windows/Scripts/KnownFolders.ps1 deleted file mode 100644 index c3e53d73..00000000 --- a/scripts/Windows/Scripts/KnownFolders.ps1 +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/Modules.ps1" KnownFolders; -Import-Module KnownFolders; diff --git a/scripts/Windows/Scripts/Modules.ps1 b/scripts/Windows/Scripts/Modules.ps1 deleted file mode 100644 index 7580685f..00000000 --- a/scripts/Windows/Scripts/Modules.ps1 +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/pwsh -param ( - [string]$ModuleName, - [switch]$WindowsPowerShell -) - -if ($WindowsPowerShell) { - if (-not (powershell -c Get-Module -ListAvailable $ModuleName)) { - Write-Host "Installing Windows PowerShell Module $ModuleName"; - powershell -c Install-Module -Force "$ModuleName"; - } -} else { - if (-not (Get-Module -ListAvailable $ModuleName)) { - Write-Host "Installing PowerShell Module $ModuleName"; - Install-Module -AcceptLicense -Force "$ModuleName"; - } -} diff --git a/scripts/Windows/Scripts/PersonalFiles.ps1 b/scripts/Windows/Scripts/PersonalFiles.ps1 deleted file mode 100644 index 0181a096..00000000 --- a/scripts/Windows/Scripts/PersonalFiles.ps1 +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../../Common/Scripts/Context.ps1"; - -function Get-BackupCandidates() { - [System.Collections.Generic.List[System.Tuple[string, string, string[]]]]$candidates = @(); - - $candidates.AddRange( - [System.Tuple[string, string, string[]][]]@( - [System.Tuple]::Create( - "Home", - "$HOME", - @( - "-i@`"$PSScriptRoot/../Resources/FileLists/Home.include.txt`"", - "-x@`"$PSScriptRoot/../Resources/FileLists/Home.exclude.txt`"")), - [System.Tuple]::Create( - "Public", - "$env:PUBLIC", - @( - "-i@`"$PSScriptRoot/../Resources/FileLists/Public.include.txt`"", - "-x@`"$PSScriptRoot/../Resources/FileLists/Public.exclude.txt`"")))); - - return $candidates; -} - -function Backup-PersonalFiles([Context] $context) { - Write-Host "Backing up Personal Files"; - - foreach ($candidate in Get-BackupCandidates) { - $context.Backup($candidate[1], $context.FileArchivePath($candidate[0]), $candidate[2]); - } -} - -function Restore-PersonalFiles([Context] $context) { - Write-Host "Restoring Personal Files"; - - foreach ($candidate in Get-BackupCandidates) { - $archivePath = $context.FileArchivePath($candidate[0]); - $context.Restore($archivePath, $candidate[1]); - } -} diff --git a/scripts/Windows/Scripts/Prerequisites.ps1 b/scripts/Windows/Scripts/Prerequisites.ps1 deleted file mode 100644 index e320b368..00000000 --- a/scripts/Windows/Scripts/Prerequisites.ps1 +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../../Common/Scripts/Context.ps1"; - -[Context]::new().PreventSleepMode(); -$null = powershell -c Get-PackageProvider -ListAvailable NuGet; - -if (-not $?) { - Write-Host "Installing NuGet PackageProvider"; - powershell -c '$null = Install-PackageProvider -Name NuGet -Force'; -} - -foreach ($module in @("PSWindowsUpdate")) -{ - if (-not (Get-Module -ListAvailable $module)) - { - Write-Host "Installing PowerShell Module $module"; - Install-Module -AcceptLicense -Force "$module"; - } -} - -foreach ($nativeModule in @("PinnedItem")) { - if (-not (powershell -c Get-Module -ListAvailable $nativeModule)) { - Write-Host "Installing Windows PowerShell Module $nativeModule"; - powershell -c Install-Module -Force "$nativeModule"; - } -} - -if (-not (Get-Command 7z -ErrorAction SilentlyContinue)) { - choco install -y 7zip.portable; -} diff --git a/scripts/Windows/Software/Ext4Fsd/Install.ps1 b/scripts/Windows/Software/Ext4Fsd/Install.ps1 deleted file mode 100644 index e3c4956f..00000000 --- a/scripts/Windows/Software/Ext4Fsd/Install.ps1 +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/pwsh -param($context) -. "$PSScriptRoot/../../../Common/Scripts/SoftwareManagement.ps1"; -Install-SoftwarePackage $context "https://github.com/bobranten/Ext4Fsd/releases/download/v0.71/Ext2Fsd-0.71-setup.exe" diff --git a/scripts/Windows/Software/Firefox/Install.ps1 b/scripts/Windows/Software/Firefox/Install.ps1 deleted file mode 100644 index c0753c8a..00000000 --- a/scripts/Windows/Software/Firefox/Install.ps1 +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../../../Common/Scripts/Context.ps1"; - -function Install-Firefox { - param([Context] $context) - Write-Host "Installing Firefox"; - choco install -y firefox; - . "$PSScriptRoot/../../Config/Firefox/Install.ps1" $context; -} diff --git a/scripts/Windows/Software/GPU-Z/Install.ps1 b/scripts/Windows/Software/GPU-Z/Install.ps1 deleted file mode 100644 index 406a6ad8..00000000 --- a/scripts/Windows/Software/GPU-Z/Install.ps1 +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/pwsh -param($context) -. "$PSScriptRoot/../../../Common/Scripts/BrowserAutomation.ps1"; -. "$PSScriptRoot/../../../Common/Scripts/Context.ps1"; -. "$PSScriptRoot/../../../Common/Scripts/SoftwareManagement.ps1"; - -Write-Host "Installing GPU-Z"; -$tempDir = $context.GetTempDirectory(); -$versionSelector = ".versions .version:first-of-type .file"; -$versionButtonSelector = "${versionSelector}.selected input.startbutton"; -$downloadButtonSelector = 'button[type="submit"]:first-of-type'; - -$action = { - param([OpenQA.Selenium.Firefox.FirefoxDriver] $browser) - $versions = $browser.FindElements([OpenQA.Selenium.By]::CssSelector($versionSelector)); - - $version = ($versions | Where-Object { $_.Text.ToUpper().Contains("ASUS ROG"); })[0]; - $version.Click(); - - $versionButton = $browser.FindElement([OpenQA.Selenium.By]::CssSelector($versionButtonSelector)); - $versionButton.Click(); - - $downloadButton = $browser.FindElement([OpenQA.Selenium.By]::CssSelector($downloadButtonSelector)); - $downloadButton.Click(); -} - -Write-Information "Downloading GPU-Z"; -$file = Start-CustomBrowserDownload $context "https://www.techpowerup.com/download/techpowerup-gpu-z/" $action $tempDir; -Write-Information "Launching GPU-Z installer"; -Start-Process -Wait -FilePath $file.FullName -ArgumentList "-installSilent"; - -Remove-Item -Recurse $tempDir; diff --git a/scripts/Windows/Software/LGHub/Install.ps1 b/scripts/Windows/Software/LGHub/Install.ps1 deleted file mode 100644 index e83ba5f3..00000000 --- a/scripts/Windows/Software/LGHub/Install.ps1 +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../../../Common/Scripts/Context.ps1"; - -$null = New-Module { - $path = "$env:LOCALAPPDATA/LGHUB"; - $softwareName = "LGHub"; - [string]$lghubPath; - - function Get-LogitechGHUBName() { - return "lghub_system_tray.exe"; - } - - function Stop-LogitechGHUB() { - [OutputType([string])] - param(); - Write-Host "Killing Logitech G HUB process"; - $hubName = Get-LogitechGHUBName; - $lghubPath = $(Get-Process | Where-Object { [System.IO.Path]::GetFileName($_.Path) -eq $hubName })[0].Path; - - $mainProcesses = Get-Process | Where-Object { @("lghub_agent.exe", $hubName) -contains [System.IO.Path]::GetFileName($_.Path) -and $( - $_.Parent.ProcessName -eq "explorer" -or $null -eq $_.Parent) }; - - $null = $mainProcesses | Foreach-Object { $_.Kill($true) }; - return $lghubPath; - } - - function Backup-LogitechGHUB([Context] $context) { - Write-Host "Backing Up Logitech G HUB"; - $hubPath = Stop-LogitechGHUB; - - Write-Information "Backing up important files"; - $context.Backup($path, $context.SoftwareArchive($softwareName), @("-i!settings.db", "-i!icon_cache")); - - if ($hubPath) { - Write-Information "Restarting Logitech G HUB"; - Start-Process $hubPath; - } - } - - function Restore-LogitechGHUB([Context] $context) { - Write-Host "Restoring Logitech G HUB"; - Write-Information "Installing the app"; - choco install -y --ignore-checksums lghub; - $hubPath = Stop-LogitechGHUB; - Write-Information "Removing existing settings"; - Remove-Item "$path/settings.*"; - Write-Information "Restoring important files"; - $context.Restore($context.SoftwareArchive($softwareName), $path); - Write-Information "Deleting desktop icon"; - $context.RemoveDesktopIcon("*G HUB*"); - Write-Information "Restarting Logitech G HUB"; - Start-Process $hubPath; - } -} diff --git a/scripts/Windows/Software/MSEdgeRedirect/Install.ps1 b/scripts/Windows/Software/MSEdgeRedirect/Install.ps1 deleted file mode 100644 index 96396317..00000000 --- a/scripts/Windows/Software/MSEdgeRedirect/Install.ps1 +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/pwsh -choco install -y MSEdgeRedirect; -. "$PSScriptRoot/../../Config/MSEdgeRedirect/Install.ps1"; diff --git a/scripts/Windows/Software/ManiaPlanet/Install.ps1 b/scripts/Windows/Software/ManiaPlanet/Install.ps1 deleted file mode 100644 index 3a338f84..00000000 --- a/scripts/Windows/Software/ManiaPlanet/Install.ps1 +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../../../Common/Scripts/Context.ps1"; - -$null = New-Module { - $path = "$HOME/Documents/ManiaPlanet"; - $softwareName = "ManiaPlanet"; - - function Backup-ManiaPlanet([Context] $context) { - Write-Information "Backing up ManiaPlanet"; - $context.Backup($path, $context.SoftwareArchive($softwareName), @("-i@`"$PSScriptRoot/include.txt`"")); - } - - function Restore-ManiaPlanet([Context] $context) { - Write-Host "Restoring ManiaPlanet"; - Write-Information "Installing ManiaPlanet"; - winget install --accept-source-agreements --accept-package-agreements -e --id Nadeo.ManiaPlanet; - Write-Information "Restoring files"; - $context.Restore($context.SoftwareArchive($softwareName), $path); - } -} diff --git a/scripts/Windows/Software/ManiaPlanet/include.txt b/scripts/Windows/Software/ManiaPlanet/include.txt deleted file mode 100644 index a1a73949..00000000 --- a/scripts/Windows/Software/ManiaPlanet/include.txt +++ /dev/null @@ -1,10 +0,0 @@ -Actions -Blocks -Items -Maps -Media -Modules -Packs -Replays -Scripts -Skins diff --git a/scripts/Windows/Software/NVS/Install.ps1 b/scripts/Windows/Software/NVS/Install.ps1 deleted file mode 100644 index 6b8e86c1..00000000 --- a/scripts/Windows/Software/NVS/Install.ps1 +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/pwsh -$env:NVS_HOME="$env:ProgramData\nvs"; -git clone "https://github.com/jasongin/nvs.git" "$env:NVS_HOME"; -& "$env:NVS_HOME\nvs.cmd" install; - -$acl = Get-Acl "$env:NVS_HOME"; - -$acl.AddAccessRule( - [System.Security.AccessControl.FileSystemAccessRule]::new( - [System.Security.Principal.SecurityIdentifier]::new([System.Security.Principal.WellKnownSidType]::BuiltinUsersSid, $null), - [System.Security.AccessControl.RegistryRights]::FullControl, - [System.Security.AccessControl.InheritanceFlags]::ObjectInherit -bor [System.Security.AccessControl.InheritanceFlags]::ContainerInherit, - [System.Security.AccessControl.PropagationFlags]::InheritOnly, - [System.Security.AccessControl.AccessControlType]::Allow)); - -Set-Acl "$env:NVS_HOME" $acl; - -refreshenv; -nvs add latest; -nvs link latest; diff --git a/scripts/Windows/Software/Nextcloud/Install.ps1 b/scripts/Windows/Software/Nextcloud/Install.ps1 deleted file mode 100644 index 0cb23372..00000000 --- a/scripts/Windows/Software/Nextcloud/Install.ps1 +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../../../Common/Scripts/Context.ps1"; - -$null = New-Module { - function Restore-Nextcloud([Context] $context) { - choco list --exact nextcloud-client - - if (-not $?) { - Write-Information "Installing Nextcloud Client"; - choco install nextcloud-client -y --params="'/KeepUpdateCheck'"; - } - - if (-not (Test-Path $context.GetNextcloudConfigFile())) { - Write-Information "Setting up Nextcloud configuration"; - - Write-Information "Ensuring all Let's Encrypt certificates are cached"; - $null = Invoke-WebRequest https://valid-isrgrootx1.letsencrypt.org/; - - while (-not (Test-Path $context.GetNextcloudConfigFile())) { - Write-Host "Nextcloud has been installed!"; - Read-Host "Please log in in the Nextcloud app and hit enter to continue"; - - if (-not (Test-Path $context.GetNextcloudConfigFile())) { - Write-Error "The login seems to have failed. Please try again."; - } - } - - $context.Reboot(); - exit; - } - } -} diff --git a/scripts/Windows/Software/Oh My Posh/Install.ps1 b/scripts/Windows/Software/Oh My Posh/Install.ps1 deleted file mode 100644 index c78bac00..00000000 --- a/scripts/Windows/Software/Oh My Posh/Install.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/pwsh -param($context); -. "$PSScriptRoot/../../../Common/Scripts/Context.ps1"; - -[Context] $context = $context; -winget install --accept-source-agreements --accept-package-agreements -s winget --scope machine -e --id JanDeDobbeleer.OhMyPosh; -. "$PSScriptRoot/../../../Common/Config/Oh My Posh/install.ps1"; diff --git a/scripts/Windows/Software/PuTTY/Install.ps1 b/scripts/Windows/Software/PuTTY/Install.ps1 deleted file mode 100644 index 546ab2fa..00000000 --- a/scripts/Windows/Software/PuTTY/Install.ps1 +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../../../Common/Scripts/Context.ps1"; - -$null = New-Module { - $softwareName = "PuTTY"; - $configFile = "$($softwareName).reg"; - - function Backup-PuTTY([Context] $context) { - Write-Host "Backing up PuTTY"; - $tempDir = $context.GetTempDirectory(); - $fileName = Join-Path "$tempDir" $configFile; - & reg export "HKCU\Software\SimonTatham" "$fileName" /y; - $context.Backup($tempDir, $context.SoftwareArchive($softwareName)); - Remove-Item -Recurse $tempDir; - } - - function Restore-PuTTY([Context] $context) { - Write-Host "Restoring PuTTY"; - Write-Information "Installing PuTTY"; - choco install -y putty; - - Write-Information "Restoring configuration"; - $tempDir = $context.GetTempDirectory(); - $fileName = Join-Path "$tempDir" $configFile; - $context.Restore($context.SoftwareArchive($softwareName), $tempDir); - & reg import "$fileName"; - Remove-Item -Recurse $tempDir; - } -} diff --git a/scripts/Windows/Software/RetroArch/Install.ps1 b/scripts/Windows/Software/RetroArch/Install.ps1 deleted file mode 100644 index 8f2d3fd6..00000000 --- a/scripts/Windows/Software/RetroArch/Install.ps1 +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../../Scripts/KnownFolders.ps1"; -. "$PSScriptRoot/../../../Common/Scripts/Context.ps1"; - -$null = New-Module { - Import-Module "$env:ChocolateyInstall/helpers/chocolateyInstaller.psm1"; - $path = "C:/tools/RetroArch-Win64"; - $softwareName = "RetroArch"; - - function Backup-RetroArch([Context] $context) { - Write-Host "Backing up RetroArch"; - $context.Backup($path, $context.SoftwareArchive($softwareName), @("-i@`"$PSScriptRoot/include.txt`"")); - } - - function Restore-RetroArch([Context] $context) { - Write-Host "Restoring RetroArch"; - Write-Information "Installing RetroArch"; - choco install -y --ignore-checksums retroarch; - Write-Information "Restoring files"; - $context.Restore($context.SoftwareArchive($softwareName), $path); - - Write-Information "Adding cloud sync folders"; - - $context.AddNextcloudSync( - "$path\saves", - "/Saved Games/RetroArch/Saves"); - - $context.AddNextcloudSync( - "$path\system", - "/Saved Games/RetroArch/System"); - - Write-Information "Creating a Start Menu Icon"; - Install-ChocolateyShortcut -ShortcutFilePath "$((Get-KnownFolder "Common Programs").Path)/RetroArch.lnk" -TargetPath ((Get-Item "$path\retroarch.exe").FullName); - } -} diff --git a/scripts/Windows/Software/RetroArch/include.txt b/scripts/Windows/Software/RetroArch/include.txt deleted file mode 100644 index cb33fa27..00000000 --- a/scripts/Windows/Software/RetroArch/include.txt +++ /dev/null @@ -1,9 +0,0 @@ -config -cores -downloads -playlists -recordings -screenshots -content_history.lpl -content_*_history.lpl -retroarch.cfg diff --git a/scripts/Windows/Software/Terminal-Icons/Install.ps1 b/scripts/Windows/Software/Terminal-Icons/Install.ps1 deleted file mode 100644 index f422ebd8..00000000 --- a/scripts/Windows/Software/Terminal-Icons/Install.ps1 +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/pwsh -Install-Module -AcceptLicense -Scope AllUsers -Force Terminal-Icons; -powershell -c "Install-Module -Scope AllUsers -Force Terminal-Icons;"; -. "$PSScriptRoot/../../Config/Terminal-Icons/Install.ps1"; diff --git a/scripts/Windows/Software/Thunderbird/Install.ps1 b/scripts/Windows/Software/Thunderbird/Install.ps1 deleted file mode 100644 index a32cce3c..00000000 --- a/scripts/Windows/Software/Thunderbird/Install.ps1 +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/pwsh -param($context) - -. "$PSScriptRoot/../../../Common/Scripts/Context.ps1"; -[Context] $context = $context; - -choco install -y thunderbird --params "/NoTaskbarShortcut /NoDesktopShortcut"; -. "$PSScriptRoot/../../Config/Thunderbird/Install.ps1" $context; diff --git a/scripts/Windows/Software/TobiiGameHub/Install.ps1 b/scripts/Windows/Software/TobiiGameHub/Install.ps1 deleted file mode 100644 index 398082ea..00000000 --- a/scripts/Windows/Software/TobiiGameHub/Install.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/pwsh -param($context) -$tempDir = $context.GetTempDirectory(); -$installer = "setup.exe"; - -Push-Location $tempDir; - -choco install -y vcredist2013; - -Write-Host "Installing Tobii Game Hub"; -Write-Information "Downloading Tobii Game Hub installer"; -Invoke-WebRequest "https://files.update.oem.tobii.com/GameHub/TobiiGameHub.3.0.1-Setup.exe" -OutFile $installer; - -Write-Information "Running Tobii Game Hub installer"; -Start-Process -Wait -FilePath "$PSScriptRoot/GameHub.ahk"; - -Pop-Location; -Remove-Item -Recurse $tempDir; diff --git a/scripts/Windows/Software/TobiiGhost/Install.ps1 b/scripts/Windows/Software/TobiiGhost/Install.ps1 deleted file mode 100644 index b56735fb..00000000 --- a/scripts/Windows/Software/TobiiGhost/Install.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/pwsh -param($context) -$tempDir = $context.GetTempDirectory(); -$installer = "setup.exe"; - -Push-Location $tempDir; - -choco install -y "dotnet-6.0-desktopruntime"; - -Write-Host "Installing Tobii Ghost"; -Write-Information "Downloading Tobii Ghost installer"; -Invoke-WebRequest "https://files.update.oem.tobii.com/Ghost/TobiiGhost.1.14.1-Setup.exe" -OutFile $installer; - -Write-Information "Running Tobii Ghost installer"; -Start-Process -Wait -FilePath "$PSScriptRoot/Ghost.ahk"; - -Pop-Location; -Remove-Item -Recurse $tempDir; diff --git a/scripts/Windows/Software/TrackMania Nations Forever/Install.ps1 b/scripts/Windows/Software/TrackMania Nations Forever/Install.ps1 deleted file mode 100644 index 951eb281..00000000 --- a/scripts/Windows/Software/TrackMania Nations Forever/Install.ps1 +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../../../Common/Scripts/Context.ps1"; - -$null = New-Module { - $path = "$HOME/Documents/TmForever"; - $softwareName = "TmNationsForever"; - - function Backup-TmNations([Context] $context) { - Write-Host "Backing up TrackMania Nations Forever"; - $context.Backup($path, $context.SoftwareArchive($softwareName), @("-i@`"$PSScriptRoot/include.txt`"")); - } - - function Restore-TmNations([Context] $context) { - $features = @("DirectPlay", "NetFx3"); - Write-Host "Restoring TrackMania Nations Forever"; - - foreach ($feature in $features) { - if ((Get-WindowsOptionalFeature -Online -FeatureName $feature).State -ne "Enabled") { - Write-Information "Enabling the ``$feature`` feature"; - $null = Enable-WindowsOptionalFeature -Online -All -FeatureName $feature; - } - } - - Write-Information "Installing TrackMania Nations Forever"; - winget install --accept-source-agreements --accept-package-agreements -e --id Nadeo.TrackManiaNationsForever; - Write-Information "Removing Desktop Icon"; - $context.RemoveDesktopIcon("*TmNationsForever*"); - Write-Information "Restoring Files"; - $context.Restore($context.SoftwareArchive($softwareName), $path); - } -} diff --git a/scripts/Windows/Software/TrackMania Nations Forever/include.txt b/scripts/Windows/Software/TrackMania Nations Forever/include.txt deleted file mode 100644 index 190afd59..00000000 --- a/scripts/Windows/Software/TrackMania Nations Forever/include.txt +++ /dev/null @@ -1,7 +0,0 @@ -ChallengeMusics -MediaTracker -MenuMusics -Painter -Scores -Skins -Tracks diff --git a/scripts/Windows/Software/TrackMania United Forever/Install.ps1 b/scripts/Windows/Software/TrackMania United Forever/Install.ps1 deleted file mode 100644 index f2ccf88b..00000000 --- a/scripts/Windows/Software/TrackMania United Forever/Install.ps1 +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../../../Common/Scripts/Context.ps1"; - -$null = New-Module { - $path = "$HOME/Documents/TrackMania"; - $softwareName = "TmUnitedForever"; - - function Backup-TmUnited([Context] $context) { - Write-Host "Backing up TrackMania United Forever"; - $context.Backup($path, $context.SoftwareArchive($softwareName), @("-i@`"$PSScriptRoot/include.txt`"")); - } - - function Restore-TmUnited([Context] $context) { - $setupFile = "TmUnitedForever.exe"; - $features = @("DirectPlay", "NetFx3"); - Write-Host "Restoring TrackMania United Forever"; - - foreach ($feature in $features) { - if ((Get-WindowsOptionalFeature -Online -FeatureName $feature).State -ne "Enabled") { - Write-Information "Enabling the ``$feature`` feature"; - $null = Enable-WindowsOptionalFeature -Online -All -FeatureName $feature; - } - } - - $tempDir = $context.GetTempDirectory(); - Push-Location $tempDir; - Write-Information "Downloading TrackMania United Forever setup"; - Invoke-WebRequest "http://files.trackmaniaforever.com/tmunitedforever_setup.exe" -OutFile "$setupFile"; - - Write-Information "Installing TrackMania United Forever"; - Start-Process -Wait -FilePath $setupFile -ArgumentList @("/Silent"); - Write-Information "Removing desktop icon"; - $context.RemoveDesktopIcon("*TmUnitedForever*"); - Write-Information "Restoring files"; - $context.Restore($context.SoftwareArchive($softwareName), $path); - Pop-Location; - - Remove-Item -Recurse $tempDir; - } -} diff --git a/scripts/Windows/Software/TrackMania United Forever/include.txt b/scripts/Windows/Software/TrackMania United Forever/include.txt deleted file mode 100644 index 5809d827..00000000 --- a/scripts/Windows/Software/TrackMania United Forever/include.txt +++ /dev/null @@ -1,6 +0,0 @@ -ChallengeMusics -MediaTracker -MenuMusics -Scores -Skins -Tracks diff --git a/scripts/Windows/Software/Ubiquiti UniFi Controller/Install.ps1 b/scripts/Windows/Software/Ubiquiti UniFi Controller/Install.ps1 deleted file mode 100644 index c48696d8..00000000 --- a/scripts/Windows/Software/Ubiquiti UniFi Controller/Install.ps1 +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/pwsh -param($context); - -. "$PSScriptRoot/../../../Common/Scripts/Context.ps1"; -[Context] $context = $context; - -Write-Host "Installing UniFi Controller"; -Write-Information "Downgrading AutoHotkey"; -$ahkID = "AutoHotkey.AutoHotkey"; -winget uninstall --accept-source-agreements -e --id "$ahkID"; -winget install --accept-source-agreements --accept-package-agreements -e --id "$ahkID" --version "1.1.37.00"; - -Write-Information "Installing JRE... eww..."; -choco install -y temurin11jre; - -Write-Information "Installing UniFi Controller"; -choco install -y ubiquiti-unifi-controller --ignore-dependencies; - -Write-Information "Upgrading AutoHotkey"; -winget uninstall --accept-source-agreements -e --id "$ahkID"; -winget install --accept-source-agreements --accept-package-agreements -e --id "$ahkID"; - -Write-Information "Removing desktop icon"; -$context.RemoveDesktopIcon("UniFi*"); diff --git a/scripts/Windows/Software/VisualStudio/Install.ps1 b/scripts/Windows/Software/VisualStudio/Install.ps1 deleted file mode 100644 index 185e9276..00000000 --- a/scripts/Windows/Software/VisualStudio/Install.ps1 +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../../Scripts/KnownFolders.ps1"; -. "$PSScriptRoot/../../../Common/Scripts/Context.ps1"; - -$null = New-Module { - $programs32Path = $(Get-KnownFolder "ProgramFilesX86").Path; - $vsInstaller = "$programs32Path/Microsoft Visual Studio/Installer/vs_installer.exe"; - - [System.Tuple[string, string, string][]]$versions = @( - [System.Tuple]::Create("visualstudio2019enterprise", "VisualStudio.16.Release", "Microsoft.VisualStudio.Product.Enterprise"), - [System.Tuple]::Create("visualstudio2019community", "VisualStudio.16.Release", "Microsoft.VisualStudio.Product.Community"), - [System.Tuple]::Create("visualstudio2022enterprise", "VisualStudio.17.Release", "Microsoft.VisualStudio.Product.Enterprise"), - [System.Tuple]::Create("visualstudio2022community", "VisualStudio.17.Release", "Microsoft.VisualStudio.Product.Community")); - - function Get-ConfigPath([Context] $context, [string] $packageName) { - return Join-Path $($context.BackupRoot()) "Visual Studio" $packageName ".vsconfig"; - } - - function Backup-VisualStudio([Context] $context) { - Write-Host "Backing up Visual Studio"; - - foreach ($version in $versions) { - if ((choco list -e $version[0])) { - Write-Information "Backing up $($version[1]): $($version[2])"; - - $configPath = Get-ConfigPath $context $version[0]; - $null = New-Item -Force -ItemType Directory "$(Split-Path -Parent $configPath)"; - - Start-Process -FilePath "$vsInstaller" ` - -Wait ` - -ArgumentList @( - "export", - "--channelId", "$($version[1])", - "--productId", "$($version[2])", - "--config", "`"$configPath`"", - "--quiet"); - } - } - } - - function Restore-VisualStudio([Context] $context) { - Write-Host "Restoring Visual Studio"; - - foreach ($version in $versions) { - $configFileName = Get-ConfigPath $context $version[0]; - - if (Test-Path $configFileName) { - Write-Information "Restoring $($version[1]): $($version[2])"; - $arguments = "--config `"$configFileName`""; - - choco install -y $version[0] --params "$arguments"; - $context.RemoveDesktopIcon("CocosCreator*"); - $context.RemoveDesktopIcon("Unity Hub*"); - } - } - } -} diff --git a/scripts/Windows/Software/WinSCP/Install.ps1 b/scripts/Windows/Software/WinSCP/Install.ps1 deleted file mode 100644 index b3a99554..00000000 --- a/scripts/Windows/Software/WinSCP/Install.ps1 +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/pwsh -param($context) - -. "$PSScriptRoot/../../../Common/Scripts/Context.ps1"; -[Context] $context = $context; - -choco install -y winscp; -$context.RemoveDesktopIcon("WinSCP*"); -. "$PSScriptRoot/../../Config/WinSCP/Install.ps1" $context; diff --git a/scripts/Windows/Software/aliae/Install.ps1 b/scripts/Windows/Software/aliae/Install.ps1 deleted file mode 100644 index b4820183..00000000 --- a/scripts/Windows/Software/aliae/Install.ps1 +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/pwsh -param($context); -. "$PSScriptRoot/../../../Common/Scripts/Context.ps1"; - -[Context] $context = $context; -winget install --accept-source-agreements --accept-package-agreements -s winget --scope machine -e --id JanDeDobbeleer.Aliae; -. "$PSScriptRoot/../../Config/aliae/Install.ps1"; -refreshenv; diff --git a/scripts/Windows/Software/git/Install.ps1 b/scripts/Windows/Software/git/Install.ps1 deleted file mode 100644 index 0d7f34ff..00000000 --- a/scripts/Windows/Software/git/Install.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../../Scripts/BashScript.ps1"; -. "$PSScriptRoot/../../../Common/Scripts/Context.ps1"; - -$null = New-Module { - function Backup-Git([Context] $context) {} - - function Restore-Git([Context] $context) { - Write-Host "Restoring git"; - - Start-BashScript @( - "bash `"$PSScriptRoot/../../../Common/Config/git/install.sh`"", - "rm ~/.bashrc"); - } -} diff --git a/scripts/Windows/Software/osu!/Install.ps1 b/scripts/Windows/Software/osu!/Install.ps1 deleted file mode 100644 index c49e6c20..00000000 --- a/scripts/Windows/Software/osu!/Install.ps1 +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../../Scripts/KnownFolders.ps1"; -. "$PSScriptRoot/../../../Common/Scripts/Context.ps1"; - -$null = New-Module { - $path = "$((Get-KnownFolder -SpecialFolder ProgramFilesX86).Path)/osu!"; - $softwareName = "osu!"; - $genericConfigName = "osu!.User.cfg"; - - function Backup-Osu([Context] $context) { - Write-Host "Backing up osu!"; - $archive = $context.SoftwareArchive($softwareName); - Write-Information "Backing up important files"; - $context.Backup($path, $archive, @("-i@`"$PSScriptRoot/include.txt`"")); - Write-Information "Renaming user configuration to $genericConfigName"; - & 7z rn "$archive" "osu!.$env:USERNAME.cfg" $genericConfigName; - } - - function Restore-Osu([Context] $context) { - Write-Host "Restoring osu!"; - Write-Information "Installing osu!"; - choco install -y osu; - $context.RemoveDesktopIcon("*osu*"); - Write-Information "Restoring files"; - $context.Restore($context.SoftwareArchive($softwareName), $path, @("-aos")); - $configName = "osu!.$env:USERNAME.cfg"; - Write-Information "Renaming user configuration to $configName"; - Push-Location $path; - - if ((Test-Path $genericConfigName)) { - Rename-Item $genericConfigName $configName; - } - - Pop-Location; - } -} diff --git a/scripts/Windows/Software/osu!/include.txt b/scripts/Windows/Software/osu!/include.txt deleted file mode 100644 index 90d01b66..00000000 --- a/scripts/Windows/Software/osu!/include.txt +++ /dev/null @@ -1,5 +0,0 @@ -Screenshots -Skins -Songs -osu!.*.cfg -scores.db diff --git a/scripts/Windows/Software/osu!lazer/Install.ps1 b/scripts/Windows/Software/osu!lazer/Install.ps1 deleted file mode 100644 index 51e3065f..00000000 --- a/scripts/Windows/Software/osu!lazer/Install.ps1 +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/pwsh -. "$PSScriptRoot/../../../Common/Scripts/Context.ps1"; - -$null = New-Module { - $path = "$env:APPDATA/osu"; - $softwareName = "osu!lazer"; - - function Backup-OsuLazer([Context] $context) { - Write-Host "Backing up osu!lazer"; - $context.Backup($path, $context.SoftwareArchive($softwareName), @("-i@`"$PSScriptRoot/include.txt`"", "-i!*.realm", "-i!*.db")); - } - - function Restore-OsuLazer([Context] $context) { - Write-Host "Restoring osu!lazer"; - Write-Information "Restoring files"; - $context.Restore($context.SoftwareArchive($softwareName), $path); - Write-Information "Installing osu!lazer"; - - $installerName = "osu!lazer.exe"; - $processName = "osu!"; - $tempDir = $context.GetTempDirectory(); - Push-Location $tempDir; - Invoke-WebRequest "https://github.com/ppy/osu/releases/latest/download/install.exe" -OutFile $installerName; - Start-Process -FilePath $installerName; - - while (-not (Get-Process -ErrorAction "SilentlyContinue" $processName)) { - Start-Sleep 1; - } - - Start-Sleep 10; - Get-Process $processName | Stop-Process -Force; - - $context.RemoveDesktopIcon("*osu*"); - Pop-Location; - Remove-Item -Recurse $tempDir; - } -} diff --git a/scripts/Windows/Software/osu!lazer/include.txt b/scripts/Windows/Software/osu!lazer/include.txt deleted file mode 100644 index 85c3f7e5..00000000 --- a/scripts/Windows/Software/osu!lazer/include.txt +++ /dev/null @@ -1,6 +0,0 @@ -files -rulesets -screenshots -framework.ini -game.ini -input.json diff --git a/scripts/Windows/Software/posh-git/Install.ps1 b/scripts/Windows/Software/posh-git/Install.ps1 deleted file mode 100644 index a9768b45..00000000 --- a/scripts/Windows/Software/posh-git/Install.ps1 +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/pwsh -Install-Module -AcceptLicense -Scope AllUsers -Force posh-git; -powershell -c "Install-Module -Scope AllUsers -Force posh-git;"; -. "$PSScriptRoot/../../Config/posh-git/Install.ps1"; diff --git a/scripts/Windows/Software/reWASD/Install.ps1 b/scripts/Windows/Software/reWASD/Install.ps1 deleted file mode 100644 index 7e915701..00000000 --- a/scripts/Windows/Software/reWASD/Install.ps1 +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/pwsh -$null = New-Module { - . "$PSScriptRoot/../../../Common/Scripts/BrowserAutomation.ps1"; - . "$PSScriptRoot/../../../Common/Scripts/Context.ps1"; - - $path = "$env:PUBLIC/Documents/reWASD"; - $softwareName = "reWASD"; - - function Backup-reWASD([Context] $context) { - Write-Host "Backing up reWASD"; - $context.Backup($path, $context.SoftwareArchive($softwareName), @("-x@`"$PSScriptRoot/exclude.txt`"")); - } - - function Restore-reWASD([Context] $context) { - Write-Host "Restoring reWASD"; - $tempDir = $context.GetTempDirectory(); - - Write-Information "Downloading reWASD"; - $file = Start-BrowserDownload $context "https://rewasd.com/" 'a.btn-default[href="#"]' $tempDir; - - Write-Information "Installing reWASD"; - Start-Process -Wait -FilePath $file.FullName -ArgumentList "/S"; - - Write-Information "Restoring files"; - $context.Restore($context.SoftwareArchive($softwareName), $path, @("-aos")); - - Write-Information "Removing desktop icon"; - $context.RemoveDesktopIcon("*reWASD*"); - Remove-Item -Recurse $tempDir; - } -} diff --git a/scripts/Windows/Software/reWASD/exclude.txt b/scripts/Windows/Software/reWASD/exclude.txt deleted file mode 100644 index 6e792f4c..00000000 --- a/scripts/Windows/Software/reWASD/exclude.txt +++ /dev/null @@ -1,10 +0,0 @@ -Logs -Presets -Profiles/Desktop -Profiles/Duality -Profiles/Fortnite -Profiles/PS4 Remote* -Profiles/Switch console -Profiles/Switch to Xbox 360 -Profiles/Valorant -Profiles/xCloud diff --git a/scripts/Windows/Software/winget/Install.ps1 b/scripts/Windows/Software/winget/Install.ps1 deleted file mode 100644 index 3e6fed73..00000000 --- a/scripts/Windows/Software/winget/Install.ps1 +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/pwsh - -function Install-Winget { - $xamlDownloadLink = "https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.6/Microsoft.UI.Xaml.2.8.x64.appx"; - $downloadLink = "https://github.com/microsoft/winget-cli/releases/latest/download/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle"; - $file = New-TemporaryFile; - $file = Rename-Item $file "$file.msixbundle" -PassThru; - Invoke-WebRequest "$xamlDownloadLink" -OutFile "$file"; - Add-AppxPackage "$file"; - Invoke-WebRequest "$downloadLink" -OutFile "$file"; - Add-AppxPackage "$file"; - Remove-Item $file; -} diff --git a/scripts/eval-module.sh b/scripts/eval-module.sh deleted file mode 100755 index 1db4acfc..00000000 --- a/scripts/eval-module.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -function evalModule() { - local modulePath="$1"; - local property="$2"; - local nixPkgs='import { config = {}; overlays = []; }'; - nix eval --file "$modulePath" "${@:3}" --apply "_: (($nixPkgs).lib.evalModules { modules = [ _ ]; }).config.$property"; -} - -evalModule $@;