Skip to content
Snippets Groups Projects
Commit be46ff25 authored by Torbjörn Lönnemark's avatar Torbjörn Lönnemark
Browse files

Disable automatic sleep/suspend

parent 97d21b49
No related branches found
No related tags found
No related merge requests found
# @summary Disble automatic sleep/hibernation
class workstation::disable_sleep {
$keys = [
'AllowSuspend',
'AllowHibernation',
'AllowSuspendThenHibernate',
'AllowHybridSleep',
]
$changes = $keys.map |$k| { "set Sleep/${k} no" }
augeas { 'disable sleep':
incl => '/etc/systemd/sleep.conf',
lens => 'Desktop.lns',
changes => $changes,
}
~> exec { '/usr/bin/systemctl daemon-reload -- disable sleep':
command => '/usr/bin/systemctl daemon-reload',
refreshonly => true,
}
}
......@@ -12,6 +12,8 @@ class workstation (
include "::workstation::desktop_environment::${e}"
}
include workstation::disable_sleep
include ::workstation::environment
include ::workstation::sysctl
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment