From 57f516d5f940e52285129cd91a12836b3ce5a3ae Mon Sep 17 00:00:00 2001 From: Matt Nish-Lapidus Date: Wed, 12 Mar 2025 10:50:28 -0400 Subject: [PATCH] sleep for media server --- hosts/media-server/configuration.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/hosts/media-server/configuration.nix b/hosts/media-server/configuration.nix index 034adbb..1da8fd4 100644 --- a/hosts/media-server/configuration.nix +++ b/hosts/media-server/configuration.nix @@ -215,10 +215,17 @@ openFirewall = true; }; - systemd.targets.sleep.enable = false; - systemd.targets.suspend.enable = false; - systemd.targets.hibernate.enable = false; - systemd.targets.hybrid-sleep.enable = false; + # systemd.targets.sleep.enable = false; + # systemd.targets.suspend.enable = false; + # systemd.targets.hibernate.enable = false; + # systemd.targets.hybrid-sleep.enable = false; + + systemd.sleep.extraConfig = '' +AllowSuspend=no +AllowHibernation=no +AllowSuspendThenHibernate=no +AllowHybridSleep=no +''; # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . system.stateVersion = "25.05"; # Did you read the comment?