=== modified file 'zsh-functions/confz_containers_init' --- old/zsh-functions/confz_containers_init 2022-06-23 09:50:35 +0000 +++ new/zsh-functions/confz_containers_init 2022-06-23 01:04:44 +0000 @@ -894,7 +894,8 @@ # --- Nix / NixOS --- confz_container_nix_image_from_release_check() { - checkvars containers_dir image_name system + checkvars containers_dir image_name + defvar system x86_64-linux defvar release 2.9.1 defvar checksum_algo sha256 defvar mirror https://releases.nixos.org/nix @@ -924,16 +925,15 @@ ;; esac - defvar alpine_arch ${vars[system]%-*} unify url $vars[mirror]/nix-$vars[release]/nix-$vars[release]-$vars[system].tar.xz (($+vars[checksum])) || die "No stored checksum for $url" require container_nix_image :containers_dir :image_name :url \ - :checksum :checksum_algo :alpine_arch \?hostname \?locale \?svscan_dir + :checksum :checksum_algo \?hostname \?locale \?svscan_dir } -confz_container_nix_bootstrap_packages_check() { +confz_container_nix_bootstrap_utils_apk_check() { checkvars user root arch uid gid defvar keys_dir /etc/apk/keys defvar apk_executable apk @@ -966,10 +966,10 @@ [[ -f $vars[root]/bin/busybox ]] } -confz_container_nix_bootstrap_check() { +confz_container_nix_bootstrap_utils_check() { checkvars root svscan_dir image_name - require container_nix_bootstrap_packages :root \?arch \?uid \?gid \ + require container_nix_bootstrap_utils_apk :root \?arch \?uid \?gid \ \?user \?keys_dir \?apk_executable \?mirror \?release \?repositories do_command=( @@ -1009,12 +1009,11 @@ } confz_container_nix_image_check() { - checkvars containers_dir image_name url checksum svscan_dir alpine_arch + checkvars containers_dir image_name url checksum svscan_dir defvar checksum_algo sha256 defvar hostname $vars[image_name] defvar locale C.UTF-8 - # TODO: actually apply hostname and locale? unify root $vars[containers_dir]/systems/$vars[image_name] unify user container-$vars[image_name] @@ -1028,14 +1027,8 @@ require container_service_sysroot :containers_dir :svscan_dir \ :image_name - require container_nix_bootstrap :user :root :uid :gid :svscan_dir \ - :image_name \ - \?arch=alpine_arch \ - \?keys_dir=alpine_keys_dir \ - \?mirror=alpine_mirrors \ - \?release=alpine_release \ - \?repositories=alpine_repositories \ - \?apk_executable + require container_nix_bootstrap_utils :user :root :uid :gid :svscan_dir \ + :image_name arch=x86_64 # TODO: infer correct arch require container_nix_image_installed :filename :root :image_name \ :svscan_dir :uid :gid :containers_dir :user === modified file 'zsh-functions/confz_site_containers_init' --- old/zsh-functions/confz_site_containers_init 2022-06-23 09:50:35 +0000 +++ new/zsh-functions/confz_site_containers_init 2022-06-21 20:30:08 +0000 @@ -13,7 +13,7 @@ display_number=$display image_name=alpine-xsession \ :containers_dir :svscan_dir :user done - for container in alpine-{games,browsers,ssh} void-musl-gajim nix-signal; do + for container in alpine-{games,browsers,ssh} void-musl-gajim; do bindroot=$vars[containers_dir]/user/$vars[user]/$container/root require container_service_generic \ image_name=$container \ @@ -80,17 +80,6 @@ :containers_dir :svscan_dir :image_name :packages } -confz_site_container_nix_check() { - checkvars containers_dir svscan_dir image_name packages - defvar arch x86_64-linux - defvar repository current/musl - - require container_nix_image_from_release \ - :containers_dir :arch :repository :image_name :svscan_dir - require container_nix_packages_installed \ - :containers_dir :svscan_dir :image_name :packages -} - confz_site_container_images_check() { checkvars containers_dir svscan_dir @@ -159,18 +148,6 @@ ) require site_container_void_musl :containers_dir :svscan_dir \ image_name=void-browsers packages="$void_core firefox" - - local -a nix_core=( - s6 - s6-{rc,linux-utils,portable-utils} - execline - ncurses - zsh - abduco - ) - - require site_container_nix :containers_dir :svscan_dir \ - image_name=nix-signal packages="$nix_core signal-desktop" } confz_site_containers_check() {