Skip to content

Commit

Permalink
As same as
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick committed Mar 17, 2024
1 parent 474b86c commit b4dd6d5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ jobs:
run: |
set -euxo pipefail
container_id="$(podman run --detach --rm home:${{ needs.get-meta.outputs.started_at }})"
trap 'podman kill "$container_id"' EXIT ERR
# shellcheck disable=SC2064
trap "podman kill '$container_id'" EXIT ERR
sleep 2 # Wait for the systemd to be ready
podman exec --user=user "$container_id" cat /etc/nix/nix.conf
podman exec --user=user --workdir='/home/user' -it "$container_id" '/home/user/.nix-profile/bin/zsh' -c 'la; lat ~/.config'
Expand Down
3 changes: 2 additions & 1 deletion containers/build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ set -euxo pipefail
build() {
podman build --tag nix-systemd --file containers/Containerfile .
local -r container_id="$(podman run --detach --rm localhost/nix-systemd:latest)"
trap 'podman kill "$container_id"' EXIT ERR
# shellcheck disable=SC2064
trap "podman kill '$container_id'" EXIT ERR
sleep 1 # Wait for the systemd to be ready
podman exec --user=user -it "$container_id" /provisioner/needs_systemd.bash
podman exec --user=root -it "$container_id" rm -rf /provisioner
Expand Down
3 changes: 2 additions & 1 deletion containers/sandbox.bash
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ set -euo pipefail

sandbox() {
local -r container_id="$(podman run --detach --rm localhost/provisioned-systemd-home)"
trap 'podman kill "$container_id"' EXIT ERR
# shellcheck disable=SC2064
trap "podman kill '$container_id'" EXIT ERR
sleep 1 # Wait for the systemd to be ready
podman exec --user=user --workdir='/home/user' -it "$container_id" '/home/user/.nix-profile/bin/zsh'
}
Expand Down

0 comments on commit b4dd6d5

Please sign in to comment.