Add swap_enabled toggle for swap setup

This commit is contained in:
2026-01-02 18:51:27 +01:00
parent 2891de8fef
commit ce972e55dd
5 changed files with 146 additions and 48 deletions

View File

@@ -28,7 +28,14 @@
}}
configuration_grub_lvm_args_value: >-
{{
['resume=/dev/mapper/sys-swap', 'rd.lvm.lv=sys/root', 'rd.lvm.lv=sys/swap']
(
['rd.lvm.lv=sys/root']
+ (
['rd.lvm.lv=sys/swap', 'resume=/dev/mapper/sys-swap']
if swap_enabled | bool
else []
)
)
if (filesystem | lower) != 'btrfs'
else []
}}