Compare commits

...

4 commits

4 changed files with 9 additions and 3 deletions

View file

@ -1,7 +1,6 @@
#!/bin/env fish
begin
set -l dir (status dirname)
set -q CONFIG_MODULE || set -l CONFIG_MODULE "$dir/config.nix"
source "$dir/../../Common/OS/setup.fish"
source "$dir/../../Common/Scripts/config.fish"
@ -15,7 +14,7 @@ begin
pacstrap -K "$mountDir" fish jq nix tmux
end
function setupOS -S -V dir -V CONFIG_MODULE -V mountDir
function setupOS -S -V dir -V mountDir
source "$dir/../../Common/Scripts/wait-network.fish"
source "$dir/../../Common/Scripts/hooks.fish"

View file

@ -3,7 +3,6 @@ function runSetup
set -l dir (status dirname)
source "$dir/../Scripts/config.fish"
source "$dir/../Scripts/hooks.fish"
set -l name (getConfig valhalla.setupUser.name)
set -l mountDir (getConfig valhalla.partition.rootDir)
set -l projectRoot (realpath "$dir/../../..")
set -l projectName (basename "$projectRoot")

View file

@ -1,4 +1,8 @@
#!/bin/env fish
function isConfigured -S
set -q "$CONFIG_MODULE"
end
function getConfig -S -a property
source "$(status dirname)/eval-module.fish"
evalModule "$CONFIG_MODULE" "$property" $argv[2..]

View file

@ -20,6 +20,10 @@ begin
source "$dir/config.fish"
set -l users (getUsers)
if not isConfigured || [ "$USER" != (getConfig "valhalla.setupUser.name") ]
runInstaller userConfig
end
for name in (echo "$users" | jq '.[]' --raw-output0 | string split0)
runInstaller userConfig "$name"
end