From 7bfcf341327c4cb84e32803755fce4032017c748 Mon Sep 17 00:00:00 2001 From: David Crompton Date: Thu, 19 Oct 2023 10:05:26 -0400 Subject: [PATCH] Disable Sleep (for SSH) --- machines/kcnhub/configuration.nix | 2 ++ machines/kcnhub/nosleep.nix | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 machines/kcnhub/nosleep.nix diff --git a/machines/kcnhub/configuration.nix b/machines/kcnhub/configuration.nix index 60bd0e2..901c730 100644 --- a/machines/kcnhub/configuration.nix +++ b/machines/kcnhub/configuration.nix @@ -16,6 +16,8 @@ ./packages.nix # Set of Users on This System ./users.nix + # Disable sleep (so SSH remains accessible) + ./nosleep.nix ]; # Support NTFS(3g) diff --git a/machines/kcnhub/nosleep.nix b/machines/kcnhub/nosleep.nix new file mode 100644 index 0000000..ba907b9 --- /dev/null +++ b/machines/kcnhub/nosleep.nix @@ -0,0 +1,6 @@ +{ ... }: { + systemd.targets.sleep.enable = false; + systemd.targets.suspend.enable = false; + systemd.targets.hibernate.enable = false; + systemd.targets.hybrid-sleep.enable = false; +}