aboutsummaryrefslogtreecommitdiff
path: root/custom/lib
diff options
context:
space:
mode:
Diffstat (limited to 'custom/lib')
-rw-r--r--custom/lib/common.sh32
-rw-r--r--custom/lib/config.sh1
2 files changed, 33 insertions, 0 deletions
diff --git a/custom/lib/common.sh b/custom/lib/common.sh
index 2f8844e..c271aec 100644
--- a/custom/lib/common.sh
+++ b/custom/lib/common.sh
@@ -101,6 +101,38 @@ fzf_multi() {
}
#############################
+# Filesystem Selection
+#############################
+
+# Select filesystem type (ZFS or Btrfs)
+# Sets global FILESYSTEM variable
+select_filesystem() {
+ step "Select Filesystem"
+
+ local options=(
+ "ZFS - Native encryption, best data integrity (recommended)"
+ "Btrfs - Native Linux, GRUB snapshot boot"
+ )
+
+ local selected
+ selected=$(fzf_select "Filesystem:" "${options[@]}")
+
+ case "$selected" in
+ ZFS*)
+ FILESYSTEM="zfs"
+ info "Selected: ZFS"
+ ;;
+ Btrfs*)
+ FILESYSTEM="btrfs"
+ info "Selected: Btrfs"
+ ;;
+ *)
+ error "No filesystem selected"
+ ;;
+ esac
+}
+
+#############################
# Disk Utilities
#############################
diff --git a/custom/lib/config.sh b/custom/lib/config.sh
index cec3d8c..38811fa 100644
--- a/custom/lib/config.sh
+++ b/custom/lib/config.sh
@@ -10,6 +10,7 @@ CONFIG_FILE=""
UNATTENDED=false
# These get populated by config file or interactive prompts
+FILESYSTEM="" # "zfs" or "btrfs"
HOSTNAME=""
TIMEZONE=""
LOCALE=""