summaryrefslogtreecommitdiff
path: root/manifests/init.pp
blob: b370940981f435afe685242744b45fc3d91dfdb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# @summary Configures LightDM
# @param package_name
#   Package containing lightdm
# @param service_name
#   Name of service to enable
# @param use_account_service
#   Should account service be used in place of users.conf
#   TODO This is currently not implemented.
class lightdm (
  String $package_name = 'lightdm',
  String $service_name = 'lightdm',
  Boolean $use_account_service = false,
) {
  ensure_packages([$package_name])

  service { $service_name:
    enable => true,
  }

  file { '/etc/lightdm/lightdm.conf':
  }

  if $use_account_service {
  } else {
    $users = {
      'UserList'        => {
        'minimum-uid'   => 1000,  # Minimum UID required to be show in greeter
        # NOTE These lists should be space delimited inline
        # TODO remove above comment:w
        'hidden-users'  => ['nobody', 'nobody4', 'noaccess'],  # Users that are shown to the user
        'hidden-shells' => ['/bin/false', '/usr/bin/nologin', '/bin/nologin', '/sbin/nologin'],
      },
    }
    file { '/etc/lightdm/users.conf':
    }
  }

  $keys = {
    'keyring' => {
      'a'     => '0x0123456789ABCD',
      'b'     => 'secret',
    },
  }
  file { '/etc/lightdm/keys.conf':
  }

  # file { '/etc/lightdm/Xsession':
  #   mode => '+x',
  # }
}