From 781a44895bfd19785aa9d6a647e69a39d50e285a Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sat, 13 Jul 2024 13:03:56 +0200 Subject: [PATCH] Allow customizing setup script per machine --- profiles/ManuSurface/Arch/setup.fish | 24 ++++++++++++++++-------- scripts/Arch/OS/setup.fish | 6 ++++-- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/profiles/ManuSurface/Arch/setup.fish b/profiles/ManuSurface/Arch/setup.fish index a519af50..952603dd 100755 --- a/profiles/ManuSurface/Arch/setup.fish +++ b/profiles/ManuSurface/Arch/setup.fish @@ -1,10 +1,18 @@ #!/bin/env fish -function installDrivers -S - source "$(status dirname)/../../../scripts/Common/Scripts/config.fish" - pacstrap -K (getConfig valhalla.partition.rootDir) linux-firmware-marvell; -end +begin + set -l dir (status dirname) -CONFIG_MODULE="$(status dirname)/config.nix" \ -ARCH_HOSTNAME="manu-surface" \ -USER_DISPLAYNAME="Manuel Thalmann" \ - source "$(status dirname)/../../../scripts/Arch/OS/setup.fish"; + 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.sh" + end + + CONFIG_MODULE="$(status dirname)/config.nix" \ + ARCH_HOSTNAME="manu-surface" \ + USER_DISPLAYNAME="Manuel Thalmann" \ + source "$(status dirname)/../../../scripts/Arch/OS/setup.fish"; +end diff --git a/scripts/Arch/OS/setup.fish b/scripts/Arch/OS/setup.fish index dc4d3a2d..0eacec4d 100644 --- a/scripts/Arch/OS/setup.fish +++ b/scripts/Arch/OS/setup.fish @@ -102,8 +102,10 @@ begin end | arch-chroot "$mountDir" tee "$file" > /dev/null end - function getInstallerScript -S - echo "$dir/install.fish" + if not type -q getInstallerScript + function getInstallerScript -S + echo "$dir/install.fish" + end end source "$dir/../../Common/OS/setup.fish"