diff --git a/nixos/modules/config/swap.nix b/nixos/modules/config/swap.nix index fa09b61ddec0..334b0c84f67a 100644 --- a/nixos/modules/config/swap.nix +++ b/nixos/modules/config/swap.nix @@ -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;