nixos/swap: detect whether swap is a device

This commit is contained in:
Atemu
2026-06-10 11:46:47 +02:00
parent a799d3e388
commit fe18bb82a1
+5
View File
@@ -106,6 +106,11 @@ let
description = "Path of the device or swap file.";
};
isDevice = mkOption {
default = lib.substring 0 5 config.device == "/dev/";
internal = true;
};
label = mkOption {
example = "swap";
type = types.str;