Massive refactoring into module-based approach

This commit is contained in:
Vili Sinervä 2025-07-06 01:16:28 +03:00
parent 8d5c9be5b6
commit 9652d7c330
Signed by: Vili Sinervä
SSH key fingerprint: SHA256:FladqYjaE4scJY3Hi+gnShZ6ygnTJgixy0I6BAoHyos
118 changed files with 2586 additions and 2159 deletions

View file

@ -0,0 +1,23 @@
{ config, lib, ... }:
let
cfg = config.custom.hibernate;
in
{
options.custom.hibernate.enable = lib.mkOption {
type = lib.types.bool;
default = false;
};
config = lib.mkIf cfg.enable {
swapDevices = [
{
device = "/var/lib/swapfile";
size = 16 * 1024;
}
];
boot = {
resumeDevice = lib.mkDefault "/dev/mapper/nixos";
};
};
}