lid switch handling

This commit is contained in:
Daniel Langbein 2023-09-16 17:23:06 +02:00
parent 50467b86e1
commit 74901b9bf2
Signed by: langfingaz
GPG Key ID: 6C47C753F0823002
5 changed files with 13 additions and 3 deletions

View File

@ -47,6 +47,7 @@ in
#../../modules/android.nix #../../modules/android.nix
#../../modules/podman.nix #../../modules/podman.nix
#../../modules/docker.nix #../../modules/docker.nix
../../modules/lid-switch-handling.nix
]; ];
networking.hostName = "yodaTab"; networking.hostName = "yodaTab";

View File

@ -47,6 +47,7 @@ in
../../modules/android.nix ../../modules/android.nix
#../../modules/podman.nix #../../modules/podman.nix
../../modules/docker.nix ../../modules/docker.nix
../../modules/lid-switch-handling.nix
]; ];
networking.hostName = "yodaTux"; networking.hostName = "yodaTux";

View File

@ -49,6 +49,7 @@ in
#../../modules/android.nix #../../modules/android.nix
#../../modules/podman.nix #../../modules/podman.nix
../../modules/docker.nix ../../modules/docker.nix
../../modules/lid-switch-handling.nix
]; ];
networking.hostName = "yodaYoga"; networking.hostName = "yodaYoga";

View File

@ -0,0 +1,10 @@
{ config, pkgs, ... }:
{
# Don't suspend if laptop lid is closed while plugged in.
# https://unix.stackexchange.com/a/307498
#
# services.logind.lidSwitch = "suspend";
services.logind.lidSwitchExternalPower = "ignore";
#services.logind.lidSwitchDocked = "ignore";
}

View File

@ -1,9 +1,6 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
services.logind.lidSwitch = "ignore";
#services.logind.lidSwitchDocked = "ignore";
users.users.yoda = { users.users.yoda = {
packages = with pkgs; [ packages = with pkgs; [
git git