남는 노트북에 NixOS 설치하고 tailscaled 깔았다. 노트북 덮개를 덮어도 절전 모드가 되지 않게 설정하려고 삽질을 조금 했는데 결론은 다음과 같이 하면 된다.

먼저 /etc/nixos/configuation.nix에 다음과 같은 내용을 적는다.

services.logind.extraConfig = ''
  HandleLidSwitch=ignore
  HandleLidSwitchExternalPower=ignore
  HandleLidSwitchDocked=ignore
  IdleAction=ignore
  IdleActionSec=0
'';

터미널에 다음과 같이 입력한다.

sudo nixos-rebuild switch
sudo systemctl restart systemd-logind

고작 노트북 한 대인데 전기비 많이 나오진 않겠지?

7

If you have a fediverse account, you can quote this note from your own instance. Search https://hackers.pub/ap/notes/0198dbf6-6d84-79dc-bce8-39535b6ad681 on your instance and quote it. (Note that quoting is not supported in Mastodon.)