Systemd/logind: Difference between revisions

Ardenet (talk | contribs)
Marked this version for translation
Tags: Mobile edit Mobile web edit
Hb (talk | contribs)
m Handle Lid Switch was also renamed
 
(2 intermediate revisions by 2 users not shown)
Line 19: Line 19:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
services.logind.powerKey = "suspend";
services.logind.settings.Login.HandlePowerKey = "suspend";
</syntaxhighlight>
</syntaxhighlight>


Line 28: Line 28:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
services.logind.powerKey = "ignore";
services.logind.settings.Login.HandlePowerKey = "ignore";
</syntaxhighlight>
</syntaxhighlight>


Line 40: Line 40:


<syntaxhighlight lang="nixos">
<syntaxhighlight lang="nixos">
services.logind.rebootKey = "ignore";
services.logind.settings.Login.HandleRebootKey = "ignore";
services.logind.suspendKey = "ignore";
services.logind.settings.Login.HandleSuspendKey = "ignore";
services.logind.hibernateKey = "ignore";
services.logind.settings.Login.HandleHibernateKey = "ignore";
</syntaxhighlight>
</syntaxhighlight>


Line 51: Line 51:


<syntaxhighlight lang="nixos">
<syntaxhighlight lang="nixos">
services.logind.lidSwitch = "ignore";
services.logind.settings.Login.HandleLidSwitch = "ignore";
</syntaxhighlight>
</syntaxhighlight>


Line 72: Line 72:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
services.logind.extraConfig = ''
services.logind.settings.Login = {
   # want to be able to listen to music while laptop closed
   # If you want to listen to music while the lid is closed
   LidSwitchIgnoreInhibited=no
   HandleLidSwitch = "ignore";
'';
};
</syntaxhighlight>
</syntaxhighlight>