From 70c8b17cc45b993a51c71b62c4fd84819dee021e Mon Sep 17 00:00:00 2001 From: Quentin Boyer Date: Wed, 24 Jul 2024 21:50:56 +0200 Subject: [PATCH] hostconfig/gandalf: Hibernate after one hour --- hostconfig/gandalf/nixos.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hostconfig/gandalf/nixos.nix b/hostconfig/gandalf/nixos.nix index 4424c09..b22f70e 100644 --- a/hostconfig/gandalf/nixos.nix +++ b/hostconfig/gandalf/nixos.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; boot.kernelParams = [ "amd_pstate=active" ]; @@ -6,6 +7,10 @@ boot.resumeDevice = "/dev/disk/by-uuid/6993932f-5b29-4207-915a-2f185ec9f485"; + systemd.sleep.extraConfig = '' + HibernateDelaySec=1h + ''; + powerManagement = { enable = true; powertop.enable = true;