Write more verbose logs to the console
This commit is contained in:
parent
3e13101b37
commit
bf2701ba08
3 changed files with 22 additions and 4 deletions
|
@ -10,7 +10,9 @@ if [ (id -u) -eq 0 ]
|
|||
|
||||
runHook createUser || \
|
||||
begin
|
||||
useradd \
|
||||
echo "Creating setup user";
|
||||
|
||||
and useradd \
|
||||
--comment "PortValhalla Setup User" \
|
||||
--system \
|
||||
--no-user-group \
|
||||
|
@ -44,7 +46,9 @@ else
|
|||
end
|
||||
|
||||
and runHook installSoftware || begin
|
||||
if [ -n "$deployScript" ]
|
||||
echo "Installing software..."
|
||||
|
||||
and if [ -n "$deployScript" ]
|
||||
source $deployScript
|
||||
end
|
||||
end
|
||||
|
@ -52,8 +56,10 @@ else
|
|||
runHook initializeUsers || begin
|
||||
if [ -n "$deployScript" ]
|
||||
source "$dir/../Scripts/config.fish"
|
||||
|
||||
for name in (getUsers | jq '.[]' --raw-output0 | string split0)
|
||||
source $deployScript userConfig $name
|
||||
echo "Configuring user `$name`..."
|
||||
and source $deployScript userConfig $name
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -62,6 +68,7 @@ else
|
|||
and sudo git config remove-section --system safe
|
||||
|
||||
and begin
|
||||
echo "Cleaning installation scripts..."
|
||||
set -l projectPath (realpath "$(status dirname)/../../..")
|
||||
cd (dirname "$projectPath")
|
||||
sudo rm -rf "$projectPath"
|
||||
|
|
|
@ -43,21 +43,29 @@ function runSetup
|
|||
"$argv"
|
||||
end
|
||||
|
||||
getOSConfig partition.script > "$script"
|
||||
echo "Partitioning drives..."
|
||||
and getOSConfig partition.script > "$script"
|
||||
and "$script"
|
||||
and rm "$script"
|
||||
|
||||
# Copy `nixpkgs` channel
|
||||
and echo "Preparing nix..."
|
||||
|
||||
and begin
|
||||
set -l channelDir /nix/var/nix/profiles/per-user/root/channels/nixpkgs
|
||||
mkdir -p (dirname "$mountDir/$channelDir")
|
||||
cp -r "$channelDir" "$mountDir/$channelDir"
|
||||
end
|
||||
|
||||
and echo "Installing dependencies..."
|
||||
and runHook installValhallaDeps
|
||||
|
||||
and echo "Cloning project..."
|
||||
and source "$dir/../../copy-repo.fish" "$mountDir$PROJECT_CLONE_ROOT"
|
||||
runChroot "$mountDir" git config --system --add safe.directory "$PROJECT_CLONE_ROOT"
|
||||
and runHook setupOS || true
|
||||
|
||||
and echo "Preparing auto-login..."
|
||||
and runHook autologin || true
|
||||
|
||||
and begin
|
||||
|
|
|
@ -3,8 +3,11 @@ set -l dir (status dirname)
|
|||
source "$dir/../Scripts/config.fish"
|
||||
set -l users (getUsers)
|
||||
|
||||
echo "Creating users..."
|
||||
|
||||
for name in (echo "$users" | jq '.[]' --raw-output0 | string split0)
|
||||
echo "Creating user `$name`..."
|
||||
|
||||
function getUserInfo -V name -a config
|
||||
getUserConfig "$name" "$config" $argv[2..]
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue