mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-21 08:01:31 +00:00
nixos/swap: detect whether swap is a device
(cherry picked from commit fe18bb82a1)
This commit is contained in:
committed by
github-actions[bot]
parent
5e847c30f7
commit
79ed1b7bd1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user