From faadb5162c4b973a3d510d85c48c2fdd47e80c99 Mon Sep 17 00:00:00 2001 From: Shawn8901 Date: Tue, 14 Jan 2025 22:24:23 +0100 Subject: [PATCH] nixos/fileSystems: omit swap comment if there are no swapDevices --- nixos/modules/tasks/filesystems.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/tasks/filesystems.nix b/nixos/modules/tasks/filesystems.nix index f98ef3304635..9afb2e45334f 100644 --- a/nixos/modules/tasks/filesystems.nix +++ b/nixos/modules/tasks/filesystems.nix @@ -400,7 +400,7 @@ in # Filesystems. ${makeFstabEntries fileSystems {}} - # Swap devices. + ${lib.optionalString (config.swapDevices != []) "# Swap devices."} ${flip concatMapStrings config.swapDevices (sw: "${sw.realDevice} none swap ${swapOptions sw}\n" )}