Compare commits
No commits in common. "b1ddb0de48354ccb0e12185f250cb6881d098d16" and "b5b5d131993bb26151bc270a999543393d667c4f" have entirely different histories.
b1ddb0de48
...
b5b5d13199
6 changed files with 19 additions and 42 deletions
|
@ -87,11 +87,6 @@ in {
|
||||||
"94.130.48.193"
|
"94.130.48.193"
|
||||||
"fe80::1"
|
"fe80::1"
|
||||||
];
|
];
|
||||||
|
|
||||||
DNS = [
|
|
||||||
"5.9.164.112"
|
|
||||||
"1.1.1.1"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Address = {
|
Address = {
|
||||||
|
|
|
@ -94,7 +94,6 @@ begin
|
||||||
|
|
||||||
and echo (getOSConfig hostname) | arch-chroot "$mountDir" tee /etc/hostname >/dev/null
|
and echo (getOSConfig hostname) | arch-chroot "$mountDir" tee /etc/hostname >/dev/null
|
||||||
|
|
||||||
and runInOS fish "$tempDir/../Software/systemd-networkd/main.fish"
|
|
||||||
and runInOS fish "$tempDir/../Software/btrfs/main.fish"
|
and runInOS fish "$tempDir/../Software/btrfs/main.fish"
|
||||||
and arch-chroot "$mountDir" mkinitcpio -P
|
and arch-chroot "$mountDir" mkinitcpio -P
|
||||||
and runInOS fish "$tempDir/../Software/grub/main.fish"
|
and runInOS fish "$tempDir/../Software/grub/main.fish"
|
||||||
|
|
|
@ -6,7 +6,6 @@ begin
|
||||||
|
|
||||||
function configureSW -V dir
|
function configureSW -V dir
|
||||||
systemctl enable systemd-networkd
|
systemctl enable systemd-networkd
|
||||||
systemctl enable systemd-resolved
|
|
||||||
configureSWBase $argv
|
configureSWBase $argv
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -77,34 +77,25 @@ function runSetup
|
||||||
and runHook --force autologin "Please set up a function `autologin` for setting up autologin for the `root` user"
|
and runHook --force autologin "Please set up a function `autologin` for setting up autologin for the `root` user"
|
||||||
|
|
||||||
and begin
|
and begin
|
||||||
set -l profile "/root/.bash_profile"
|
set -l script (string escape (getCloneFile (getInstallerScript)))
|
||||||
|
|
||||||
begin
|
wrapScript (
|
||||||
set -l profile (string escape "$profile")
|
string join " " \
|
||||||
set -l tmp (string escape "$profile""_")
|
(begin
|
||||||
set -l script (string escape (getCloneFile (getInstallerScript)))
|
for var in \
|
||||||
|
CONFIG_NAME \
|
||||||
|
VALHALLA_BACKUP_DISABLED \
|
||||||
|
VALHALLA_BACKUP_DIR \
|
||||||
|
VALHALLA_BACKUP_SERVER \
|
||||||
|
VALHALLA_BACKUP_SERVER_PORT \
|
||||||
|
VALHALLA_BACKUP_SERVER_USER \
|
||||||
|
VALHALLA_BACKUP_SERVER_KEY
|
||||||
|
echo "$var=$(string escape "$$var")"
|
||||||
|
end
|
||||||
|
end) \
|
||||||
|
(string escape $script))
|
||||||
|
|
||||||
printf "%s\n" \
|
end | runChroot "$mountDir" tee /root/.bash_profile >/dev/null
|
||||||
"mv $profile $tmp" \
|
|
||||||
(wrapScript (
|
|
||||||
string join " " \
|
|
||||||
(begin
|
|
||||||
for var in \
|
|
||||||
CONFIG_NAME \
|
|
||||||
VALHALLA_BACKUP_DISABLED \
|
|
||||||
VALHALLA_BACKUP_DIR \
|
|
||||||
VALHALLA_BACKUP_SERVER \
|
|
||||||
VALHALLA_BACKUP_SERVER_PORT \
|
|
||||||
VALHALLA_BACKUP_SERVER_USER \
|
|
||||||
VALHALLA_BACKUP_SERVER_KEY
|
|
||||||
echo "$var=$(string escape "$$var")"
|
|
||||||
end
|
|
||||||
end) \
|
|
||||||
(string escape $script) "&&")) \
|
|
||||||
"rm $tmp ||"
|
|
||||||
"mv $tmp $profile"
|
|
||||||
end | runChroot "$mountDir" tee "$profile" >/dev/null
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function actionPostRun
|
function actionPostRun
|
||||||
|
|
|
@ -8,7 +8,7 @@ begin
|
||||||
set config (getProgramConfig $argv --json)
|
set config (getProgramConfig $argv --json)
|
||||||
|
|
||||||
for name in (echo "$config" | jq '.networkFiles | keys[]' --raw-output0 | string split0 || true)
|
for name in (echo "$config" | jq '.networkFiles | keys[]' --raw-output0 | string split0 || true)
|
||||||
echo "$config" | NAME=$name jq '.networkFiles[env.NAME]' --raw-output | sudo tee "/etc/systemd/network/10-$name.network" >/dev/null
|
echo "$config" | NAME=$name jq '.networkFiles[env.NAME]' | sudo tee "/etc/systemd/network/10-$name.network" >/dev/null
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -55,8 +55,6 @@ function runSetupUserAction -V dir
|
||||||
set -l sudoConfig "/etc/sudoers.d/PortValhalla"
|
set -l sudoConfig "/etc/sudoers.d/PortValhalla"
|
||||||
|
|
||||||
begin
|
begin
|
||||||
set success true
|
|
||||||
|
|
||||||
if id -u "$name" &>/dev/null
|
if id -u "$name" &>/dev/null
|
||||||
echo "Setup user already exists!"
|
echo "Setup user already exists!"
|
||||||
else
|
else
|
||||||
|
@ -76,15 +74,10 @@ function runSetupUserAction -V dir
|
||||||
end >"$sudoConfig"
|
end >"$sudoConfig"
|
||||||
|
|
||||||
and sudo --preserve-env --set-home --user "$name" env "PATH=$PATH" $cmdline
|
and sudo --preserve-env --set-home --user "$name" env "PATH=$PATH" $cmdline
|
||||||
or begin
|
or read -P "An error occurred! Press enter to continue: "
|
||||||
read -P "An error occurred! Press enter to continue: "
|
|
||||||
set success false
|
|
||||||
end
|
|
||||||
|
|
||||||
disposeAction
|
disposeAction
|
||||||
rm "$sudoConfig"
|
rm "$sudoConfig"
|
||||||
userdel -rf "$name"
|
userdel -rf "$name"
|
||||||
success
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue