mirror of
https://github.com/TECHNOFAB11/disko.git
synced 2025-12-11 23:50:05 +01:00
feat(swap): add resumeDevice option which sets boot.resumeDevice
This commit is contained in:
parent
5874372542
commit
876969d793
2 changed files with 7 additions and 0 deletions
|
|
@ -38,6 +38,7 @@
|
||||||
content = {
|
content = {
|
||||||
type = "swap";
|
type = "swap";
|
||||||
randomEncryption = true;
|
randomEncryption = true;
|
||||||
|
resumeDevice = true; # resume from hiberation from this device
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,11 @@
|
||||||
default = false;
|
default = false;
|
||||||
description = "Whether to randomly encrypt the swap";
|
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 {
|
_parent = lib.mkOption {
|
||||||
internal = true;
|
internal = true;
|
||||||
default = parent;
|
default = parent;
|
||||||
|
|
@ -51,6 +56,7 @@
|
||||||
device = config.device;
|
device = config.device;
|
||||||
randomEncryption = config.randomEncryption;
|
randomEncryption = config.randomEncryption;
|
||||||
}];
|
}];
|
||||||
|
boot.resumeDevice = lib.mkIf config.resumeDevice dev;
|
||||||
}];
|
}];
|
||||||
description = "NixOS configuration";
|
description = "NixOS configuration";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue