From ace755b6b5fe5c49d1757f3bba34c6d8d1f8c3af Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Wed, 10 Jan 2024 17:46:28 +0100 Subject: [PATCH] feat(iso/dgn-install.sh): Allow declaring a swap partition --- iso/dgn-install/dgn-install.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/iso/dgn-install/dgn-install.sh b/iso/dgn-install/dgn-install.sh index ab5c767..2856d0a 100644 --- a/iso/dgn-install/dgn-install.sh +++ b/iso/dgn-install/dgn-install.sh @@ -18,6 +18,10 @@ while [ "$#" -gt 0 ]; do bootDevice="$1" shift 1 ;; + --swap) + swapDevice="$1" + shift 1 + ;; --domain) domain="$1" shift 1 @@ -52,6 +56,10 @@ mkdir /mnt/boot mount "$bootDevice" /mnt/boot +if [ "x$swapDevice" != "x" ]; then + swapon "$swapDevice" +fi + # Generate configration nixos-generate-config --root /mnt