summaryrefslogtreecommitdiff
path: root/manifests/nonlaptop.pp
blob: 8a917d28e6d80d869b0df58c6f41b6ce7850a87d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# For laptops which now work as stationary workstations/servers
class profiles::nonlaptop (
  Boolean $dock = false,
) {
  ini_setting { 'Disable lid switch':
    ensure  => present,
    path    => '/etc/systemd/logind.conf',
    section => 'Login',
    setting => 'HandleLidSwitch',
    value   => if $dock { 'suspend' } else { 'ignore' },
  }

  if ($dock) {
    ini_setting { 'Disable lid switch when docked':
      ensure  => present,
      path    => '/etc/systemd/logind.conf',
      section => 'Login',
      setting => 'HandleLidSwitchDocked',
      value   => 'ignore',
    }
  }

}