From 6ec0b0f7c721a8beea4f708fc1ed4e8c311ac94b Mon Sep 17 00:00:00 2001 From: Nathan Henrie Date: Mon, 30 Jan 2023 15:51:52 -0700 Subject: [PATCH] Revert to hdiutil for older macos compatibility, be explicit about the weird number after ram:// --- modules/age.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/age.nix b/modules/age.nix index ec8546f..7f2fc0f 100644 --- a/modules/age.nix +++ b/modules/age.nix @@ -23,7 +23,8 @@ with lib; let if isDarwin then '' if ! diskutil info "${cfg.secretsMountPoint}" &> /dev/null; then - dev=$(diskutil image attach -mountPolicy=noMount ram://1MiB | sed 's/[[:space:]]*$//') + num_sectors=1048576 + dev=$(hdiutil attach -nomount ram://"$num_sectors" | sed 's/[[:space:]]*$//') newfs_hfs -v agenix "$dev" mount -t hfs -o nobrowse,nodev,nosuid,-m=0751 "$dev" "${cfg.secretsMountPoint}" fi