mirror of
https://github.com/blazblue547-afk/ForgeOS-ARM64.git
synced 2026-12-02 14:44:17 -05:00
feat: add systemd Nix rootfs
This commit is contained in:
1 parent
9e86817361
commit
1c3099dbac
38 files changed
+735
-1190
No files matched your search
@@ -4,11 +4,11 @@ set -euo pipefail
|
||||
|
||||
source "$(dirname "$0")/common.sh"
|
||||
|
||||
require_cmd chmod find head install ln mkdir rsync sort tar
|
||||
require_cmd chmod find head install ln mkdir rsync sort
|
||||
ensure_dirs
|
||||
|
||||
[[ "$ARCH" == "arm64" ]] || die "Nix rootfs staging currently supports ARCH=arm64 only"
|
||||
[[ "$NIX_SYSTEM" == "aarch64-linux" ]] || die "Nix rootfs staging currently supports NIX_SYSTEM=aarch64-linux only"
|
||||
[[ "$ARCH" == "arm64" ]] || die "Nix staging currently supports ARCH=arm64 only"
|
||||
[[ "$NIX_SYSTEM" == "aarch64-linux" ]] || die "Nix staging currently supports NIX_SYSTEM=aarch64-linux only"
|
||||
[[ -d "$ROOTFS_STAGING_DIR" ]] || die "missing rootfs staging tree: $ROOTFS_STAGING_DIR"
|
||||
|
||||
if [[ ! -d "$NIX_SRC_DIR/store" || ! -f "$NIX_SRC_DIR/.reginfo" ]]; then
|
||||
@@ -67,10 +67,6 @@ for tool in nix nix-build nix-channel nix-collect-garbage nix-copy-closure nix-d
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -e "$ROOTFS_STAGING_DIR/usr/sbin/nologin" ]]; then
|
||||
ln -sfn ../usr/sbin/nologin "$ROOTFS_STAGING_DIR/sbin/nologin"
|
||||
fi
|
||||
|
||||
cat > "$ROOTFS_STAGING_DIR/etc/nix/nix.conf" <<'EOF'
|
||||
build-users-group = nixbld
|
||||
allowed-users = *
|
||||
|
||||
Reference in new issue
Block a user