Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: tarball builder #341

Merged
merged 2 commits into from
Nov 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/build-tarball.nix
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ in

root=$(mktemp -p "''${TMPDIR:-/tmp}" -d nixos-wsl-tarball.XXXXXXXXXX)
# FIXME: fails in CI for some reason, but we don't really care because it's CI
trap 'rm -rf "$root" || true' INT TERM EXIT
trap 'chattr -Rf -i "$root" || true && rm -rf "$root" || true' INT TERM EXIT
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is doing what you thought it would do

Suggested change
trap 'chattr -Rf -i "$root" || true && rm -rf "$root" || true' INT TERM EXIT
trap 'chattr -Rf -i "$root"; rm -rf "$root"; true' INT TERM EXIT

we probably want something like the above


chmod o+rx "$root"

Expand All @@ -68,7 +68,7 @@ in
--substituters ""

echo "[NixOS-WSL] Adding channel..."
nixos-enter --root "$root" --command 'nix-channel --add https://github.com/nix-community/NixOS-WSL/archive/refs/heads/main.tar.gz nixos-wsl'
nixos-enter --root "$root" --command 'HOME=/root nix-channel --add https://github.com/nix-community/NixOS-WSL/archive/refs/heads/main.tar.gz nixos-wsl'

echo "[NixOS-WSL] Adding default config..."
install -Dm644 ${defaultConfig} "$root/etc/nixos/configuration.nix"
Expand Down
Loading