Remove obsolete code
This commit is contained in:
parent
c4267e14d4
commit
976f543b36
223 changed files with 0 additions and 4889 deletions
|
@ -1,16 +0,0 @@
|
||||||
let
|
|
||||||
inherit (nixpkgs) lib;
|
|
||||||
nixpkgs = import <nixpkgs> { 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
|
|
|
@ -1,4 +0,0 @@
|
||||||
#!/bin/env fish
|
|
||||||
begin
|
|
||||||
bash "$(status dirname)/install.sh"
|
|
||||||
end
|
|
|
@ -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;
|
|
|
@ -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
|
|
|
@ -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;
|
|
|
@ -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;
|
|
||||||
}
|
|
|
@ -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;
|
|
||||||
}
|
|
|
@ -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;
|
|
|
@ -1,5 +0,0 @@
|
||||||
#!/bin/pwsh
|
|
||||||
$env:WIN_COMPUTER_NAME = "DerGeret";
|
|
||||||
$env:CONFIG_NAME = $env:WIN_COMPUTER_NAME;
|
|
||||||
|
|
||||||
. "$PSScriptRoot/../../../../../scripts/Windows/OS/Setup.ps1";
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -1,5 +0,0 @@
|
||||||
#!/bin/pwsh
|
|
||||||
$env:WIN_COMPUTER_NAME ??= "win11";
|
|
||||||
$env:CONFIG_MODULE ??= "$PSScriptRoot/../config.nix";
|
|
||||||
|
|
||||||
. "$PSScriptRoot/../../../../../scripts/Windows/OS/Setup.ps1";
|
|
|
@ -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";
|
|
|
@ -1,2 +0,0 @@
|
||||||
#!/bin/pwsh
|
|
||||||
. "$PSScriptRoot/../../../../Generic/Windows/Setup.ps1";
|
|
|
@ -1,5 +0,0 @@
|
||||||
#!/bin/env fish
|
|
||||||
begin
|
|
||||||
set -l dir (status dirname)
|
|
||||||
source "$dir/../../../../../scripts/Arch/OS/install.fish"
|
|
||||||
end
|
|
|
@ -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;
|
|
|
@ -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
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -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";
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -1,5 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
pushd "${BASH_SOURCE%/*}" > /dev/null;
|
|
||||||
yay --noconfirm -Syu firefox;
|
|
||||||
. "../../../Common/Config/Firefox/install.sh";
|
|
||||||
popd > /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;
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -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 \
|
|
||||||
;
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -1,5 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
pushd "${BASH_SOURCE%/*}" > /dev/null;
|
|
||||||
yay --noconfirm -Syu pennywise-bin;
|
|
||||||
. "../../../Common/Config/Pennywise/install.sh";
|
|
||||||
popd > /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;
|
|
|
@ -1,10 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
pushd "${BASH_SOURCE%/*}" > /dev/null;
|
|
||||||
|
|
||||||
yay --noconfirm -Syu \
|
|
||||||
aliae-bin \
|
|
||||||
;
|
|
||||||
|
|
||||||
. "../../../Unix/Config/aliae/install.sh";
|
|
||||||
|
|
||||||
popd > /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;
|
|
|
@ -1,2 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
yay --noconfirm -Syu bt-dualboot;
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -1,2 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
yay --noconfirm -Syu gnome-shell-extension-installer;
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -1,5 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
pushd "${BASH_SOURCE%/*}" > /dev/null;
|
|
||||||
yay --noconfirm -Syu rclone;
|
|
||||||
source "../../../Common/Config/rclone/install.sh";
|
|
||||||
popd > /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;
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -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 \
|
|
||||||
;
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -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";
|
|
|
@ -1,2 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
cp ${BASH_SOURCE%/*}/*.json ~/.var/app/com.github.wwmm.easyeffects/config/easyeffects/output/;
|
|
|
@ -1,4 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
pushd "${BASH_SOURCE%/*}" > /dev/null;
|
|
||||||
sudo cp ../../Software/Firefox/firefox.sh /etc/profile.d/;
|
|
||||||
popd > /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
|
|
|
@ -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
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -1,9 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
function installExtension() {
|
|
||||||
local -n queue="$1";
|
|
||||||
|
|
||||||
for id in ${queue[@]}
|
|
||||||
do
|
|
||||||
gnome-shell-extension-installer "$id" --yes;
|
|
||||||
done;
|
|
||||||
}
|
|
|
@ -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;
|
|
|
@ -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
|
|
||||||
)
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -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")";
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -1,3 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
sudo usermod -aG docker "$USER";
|
|
||||||
sudo systemctl enable --now docker;
|
|
|
@ -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;
|
|
|
@ -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";
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -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";
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -1,4 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
{
|
|
||||||
echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="0483", MODE="0666"';
|
|
||||||
} | sudo tee /etc/udev/rules.d/50-ct-board.rules;
|
|
|
@ -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;
|
|
|
@ -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;
|
|
|
@ -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
|
|
||||||
)
|
|
|
@ -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;
|
|
|
@ -1,2 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
eval "$("${BASH_SOURCE%/*}/../../eval-module.sh" "$CONFIG_MODULE" valhalla.partition.script --raw)";
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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.";
|
|
||||||
}
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue