mirror of
https://github.com/nix-community/disko.git
synced 2026-11-30 21:13:28 +01:00
feat(swap): add resumeDevice option which sets boot.resumeDevice
This commit is contained in:
1 parent
5874372542
commit
57622c4a68
2 files changed
+7
No files matched your search
@@ -38,6 +38,7 @@
|
||||
content = {
|
||||
type = "swap";
|
||||
randomEncryption = true;
|
||||
resumeDevice = true; # resume from hiberation from this device
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
@@ -16,6 +16,11 @@
|
||||
default = false;
|
||||
description = "Whether to randomly encrypt the swap";
|
||||
};
|
||||
resumeDevice = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Whether to use this as a boot.resumeDevice";
|
||||
};
|
||||
_parent = lib.mkOption {
|
||||
internal = true;
|
||||
default = parent;
|
||||
@@ -51,6 +56,7 @@
|
||||
device = config.device;
|
||||
randomEncryption = config.randomEncryption;
|
||||
}];
|
||||
boot.resumeDevice = lib.mkIf config.resumeDevice dev;
|
||||
}];
|
||||
description = "NixOS configuration";
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user