From 7014eddf0c668a8903a8270add2d275fb0f948ed Mon Sep 17 00:00:00 2001 From: Nathan Chancellor Date: Mon, 23 Dec 2024 23:42:21 -0700 Subject: [PATCH] fish: user_setup: Use systemd-nspawn for main development environment Signed-off-by: Nathan Chancellor --- fish/functions/user_setup.fish | 35 ++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/fish/functions/user_setup.fish b/fish/functions/user_setup.fish index 96130346..88c47412 100644 --- a/fish/functions/user_setup.fish +++ b/fish/functions/user_setup.fish @@ -267,9 +267,6 @@ rpmbuild/' >>$gitignore else updall --no-os; or return end - if has_container_manager; and test "$LOCATION" != wsl - dbxc --yes - end # Git config and aliases git_setup @@ -340,19 +337,29 @@ rpmbuild/' >>$gitignore decrypt_gpg_file server_ip set github_repos hugo-files nathanchance.github.io - - case '*' - return 0 end - mkdir -p $GITHUB_FOLDER - for github_repo in $github_repos - set folder $GITHUB_FOLDER/$github_repo - if not test -d $folder - gh repo clone $github_repo $folder; or return - end - if test "$github_repo" = hugo-files - git -C $folder submodule update --init --recursive + if set -q github_repos + mkdir -p $GITHUB_FOLDER + for github_repo in $github_repos + set folder $GITHUB_FOLDER/$github_repo + if not test -d $folder + gh repo clone $github_repo $folder; or return + end + if test "$github_repo" = hugo-files + git -C $folder submodule update --init --recursive + end end end + + switch $LOCATION + case hetzner workstation + sd_nspawn -i + + case wsl + case '*' + if has_container_manager + dbxc --yes + end + end end