Refactor the directory structure

This commit is contained in:
Manuel Thalmann 2024-09-03 23:10:35 +02:00
parent 79ee2a6f66
commit 573f2f8882
36 changed files with 121 additions and 116 deletions

View file

@ -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;

View file

@ -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;

View file

@ -1,5 +0,0 @@
#!/bin/env fish
begin
set -l dir (status dirname)
source "$dir/../../../scripts/Arch/OS/install.fish"
end

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -0,0 +1,19 @@
#!/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;

View file

@ -9,5 +9,5 @@ begin
CONFIG_MODULE="$dir/config.nix" \ CONFIG_MODULE="$dir/config.nix" \
ARCH_HOSTNAME="der-geret" \ ARCH_HOSTNAME="der-geret" \
USER_DISPLAYNAME="Manuel Thalmann" \ USER_DISPLAYNAME="Manuel Thalmann" \
source "$(status dirname)/../../../scripts/Arch/OS/setup.fish" source "$(status dirname)/../../../../../scripts/Arch/OS/setup.fish"
end end

View file

@ -4,6 +4,6 @@ pushd "${BASH_SOURCE%/*}" > /dev/null;
CONFIG_MODULE="./config.nix" \ CONFIG_MODULE="./config.nix" \
ARCH_HOSTNAME="der-geret" \ ARCH_HOSTNAME="der-geret" \
USER_DISPLAYNAME="Manuel Thalmann" \ USER_DISPLAYNAME="Manuel Thalmann" \
. "../../../scripts/Arch/OS/setup.sh"; . "../../../../../scripts/Arch/OS/setup.sh";
popd > /dev/null; popd > /dev/null;

View file

@ -1,7 +1,7 @@
#!/bin/pwsh #!/bin/pwsh
$null = New-Module { $null = New-Module {
. "$PSScriptRoot/../../../scripts/Common/Scripts/Context.ps1"; . "$PSScriptRoot/../../../../../scripts/Common/Scripts/Context.ps1";
. "$PSScriptRoot/../../../scripts/Windows/OS/Legacy.ps1"; . "$PSScriptRoot/../../../../../scripts/Windows/OS/Legacy.ps1";
Write-Host "Starting Backup of Windows"; Write-Host "Starting Backup of Windows";
$context = [Context]::new(); $context = [Context]::new();

View file

@ -1,12 +1,12 @@
#!/bin/pwsh #!/bin/pwsh
. "$PSScriptRoot/../../../scripts/Common/Scripts/Context.ps1"; . "$PSScriptRoot/../../../../../scripts/Common/Scripts/Context.ps1";
function Install-PortValhallaDrivers { function Install-PortValhallaDrivers {
param( param(
[Context] $context [Context] $context
) )
$winPath = "$PSScriptRoot/../../../scripts/Windows"; $winPath = "$PSScriptRoot/../../../../../scripts/Windows";
$driverPath = "$winPath/Drivers"; $driverPath = "$winPath/Drivers";
$mbDriverPath = "$driverPath/ROG Zenith Extreme Alpha"; $mbDriverPath = "$driverPath/ROG Zenith Extreme Alpha";
$context.RegisterReboot(); $context.RegisterReboot();
@ -38,7 +38,7 @@ function Install-PersonalDrivers {
[Context] $context [Context] $context
) )
$softwarePath = "$PSScriptRoot/../../../scripts/Windows/Software"; $softwarePath = "$PSScriptRoot/../../../../../scripts/Windows/Software";
. "$softwarePath/TobiiGhost/Install.ps1" $context; . "$softwarePath/TobiiGhost/Install.ps1" $context;
. "$softwarePath/TobiiGameHub/Install.ps1" $context; . "$softwarePath/TobiiGameHub/Install.ps1" $context;
} }

View file

@ -1,8 +1,8 @@
#!/bin/pwsh #!/bin/pwsh
. "$PSScriptRoot/Drivers.ps1"; . "$PSScriptRoot/Drivers.ps1";
. "$PSScriptRoot/../../../scripts/Common/Scripts/Context.ps1"; . "$PSScriptRoot/../../../../../scripts/Common/Scripts/Context.ps1";
. "$PSScriptRoot/../../../scripts/Windows/Collections/Personal.ps1" . "$PSScriptRoot/../../../../../scripts/Windows/Collections/Personal.ps1"
. "$PSScriptRoot/../../../scripts/Windows/OS/Manage.ps1"; . "$PSScriptRoot/../../../../../scripts/Windows/OS/Manage.ps1";
function Initialize-Configuration { function Initialize-Configuration {
# Fix synchronization between Linux and Windows clock # Fix synchronization between Linux and Windows clock

View file

@ -3,4 +3,4 @@ $env:WIN_COMPUTER_NAME = "DerGeret";
$env:SETUP_SCRIPT_NAME = "$PSScriptRoot/Restore.ps1"; $env:SETUP_SCRIPT_NAME = "$PSScriptRoot/Restore.ps1";
$env:CONFIG_MODULE = "$PSScriptRoot/../config.nix"; $env:CONFIG_MODULE = "$PSScriptRoot/../config.nix";
. "$PSScriptRoot/../../../scripts/Windows/OS/Setup.ps1"; . "$PSScriptRoot/../../../../../scripts/Windows/OS/Setup.ps1";

View file

@ -1,9 +1,9 @@
{ ... }: { { ... }: {
imports = [ imports = [
../Generic/config.nix ../defaults.nix
]; ];
config = { config = {
valhalla = { valhalla = {
windows = { windows = {
dualboot = { dualboot = {

View file

@ -3,11 +3,11 @@ function install() {
local dir="$(realpath "${BASH_SOURCE%/*}")"; local dir="$(realpath "${BASH_SOURCE%/*}")";
function installDrivers() { function installDrivers() {
. "$dir/../../../scripts/Arch/Config/SecureBoot/install.sh"; . "$dir/../../../../../scripts/Arch/Config/SecureBoot/install.sh";
} }
. "../../../scripts/Arch/OS/install.sh"; . "../../../../../scripts/Arch/OS/install.sh";
} }
install; install;

View file

@ -4,6 +4,6 @@ pushd "${BASH_SOURCE%/*}" > /dev/null;
ARCH_MOUNT_ROOT="/mnt" \ ARCH_MOUNT_ROOT="/mnt" \
ARCH_HOSTNAME="archlinux" \ ARCH_HOSTNAME="archlinux" \
USER_DISPLAYNAME="Manuel Thalmann" \ USER_DISPLAYNAME="Manuel Thalmann" \
. "../../../scripts/Arch/OS/setup.sh"; . "../../../../../scripts/Arch/OS/setup.sh";
popd > /dev/null; popd > /dev/null;

View file

@ -0,0 +1,13 @@
#!/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;

View file

@ -3,4 +3,4 @@ $env:WIN_COMPUTER_NAME ??= "win11";
$env:SETUP_SCRIPT_NAME ??= "$PSScriptRoot/Install.ps1"; $env:SETUP_SCRIPT_NAME ??= "$PSScriptRoot/Install.ps1";
$env:CONFIG_MODULE ??= "$PSScriptRoot/../config.nix"; $env:CONFIG_MODULE ??= "$PSScriptRoot/../config.nix";
. "$PSScriptRoot/../../../scripts/Windows/OS/Setup.ps1"; . "$PSScriptRoot/../../../../../scripts/Windows/OS/Setup.ps1";

View file

@ -1,10 +1,9 @@
{ lib, config, ... }: { lib, config, ... }:
let let
fs = import ../../lib/modules/partition/fs.nix; fs = import ../../../../lib/modules/partition/fs.nix;
in { in {
imports = [ imports = [
../manuel/config.nix ../defaults.nix
../../lib/modules/valhalla.nix
]; ];
config = { config = {

View file

@ -14,4 +14,4 @@ function Install-PortValhallaDrivers {
choco install -y spice-agent; choco install -y spice-agent;
} }
. "$PSScriptRoot/../../Generic/Windows/Install.ps1"; . "$PSScriptRoot/../../../../Generic/Windows/Install.ps1";

View file

@ -1,4 +1,4 @@
#!/bin/pwsh #!/bin/pwsh
$env:SETUP_SCRIPT_NAME ??= "$PSScriptRoot/Install.ps1"; $env:SETUP_SCRIPT_NAME ??= "$PSScriptRoot/Install.ps1";
. "$PSScriptRoot/../../Generic/Windows/Setup.ps1"; . "$PSScriptRoot/../../../../Generic/Windows/Setup.ps1";

View file

@ -0,0 +1,5 @@
#!/bin/env fish
begin
set -l dir (status dirname)
source "$dir/../../../../../scripts/Arch/OS/install.fish"
end

View file

@ -0,0 +1,26 @@
#!/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;

View file

@ -3,7 +3,7 @@ begin
set -l dir (status dirname) set -l dir (status dirname)
function installDrivers -V dir -S function installDrivers -V dir -S
source "$dir/../../../scripts/Common/Scripts/config.fish" source "$dir/../../../../../scripts/Common/Scripts/config.fish"
pacstrap -K (getConfig valhalla.partition.rootDir) linux-firmware-marvell; pacstrap -K (getConfig valhalla.partition.rootDir) linux-firmware-marvell;
end end
@ -14,5 +14,5 @@ begin
CONFIG_MODULE="$(status dirname)/config.nix" \ CONFIG_MODULE="$(status dirname)/config.nix" \
ARCH_HOSTNAME="manu-surface" \ ARCH_HOSTNAME="manu-surface" \
USER_DISPLAYNAME="Manuel Thalmann" \ USER_DISPLAYNAME="Manuel Thalmann" \
source "$(status dirname)/../../../scripts/Arch/OS/setup.fish"; source "$(status dirname)/../../../../../scripts/Arch/OS/setup.fish";
end end

View file

@ -0,0 +1,16 @@
#!/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;

View file

@ -0,0 +1,12 @@
#!/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;

View file

@ -0,0 +1,6 @@
{ ... }: {
imports = [
../../users/manuel/config.nix
../../../lib/modules/valhalla.nix
];
}

View file

@ -1,6 +1,6 @@
{ ... }: { { ... }: {
imports = [ imports = [
../../lib/modules/valhalla.nix ../../../lib/modules/valhalla.nix
]; ];
config = { config = {