{-# LANGUAGE FlexibleInstances #-}

-- | Maintainer: Sean Whitton <spwhitton@spwhitton.name>

module Propellor.Property.LightDM where

import Propellor.Base
import qualified Propellor.Property.ConfFile as ConfFile

-- | Configures LightDM to skip the login screen and autologin as a user.
autoLogin :: User -> Property NoInfo
autoLogin (User u) = "/etc/lightdm/lightdm.conf" `ConfFile.containsIniSetting`
	("SeatDefaults", "autologin-user", u)
	`describe` "lightdm autologin"

{-# LANGUAGE FlexibleInstances #-}

-- | Maintainer: Sean Whitton <spwhitton@spwhitton.name>

module Propellor.Property.LightDM where

import Propellor.Base
import qualified Propellor.Property.Apt as Apt
import qualified Propellor.Property.ConfFile as ConfFile

installed :: Property NoInfo
installed = Apt.installed ["lightdm"]

-- | Configures LightDM to skip the login screen and autologin as a user.
autoLogin :: User -> Property NoInfo
autoLogin (User u) = "/etc/lightdm/lightdm.conf" `ConfFile.containsIniSetting`
	("SeatDefaults", "autologin-user", u)
	`describe` "lightdm autologin"

Add convenience .installed for lightdm.
Add convenience .installed for lightdm.

Signed-off-by: Jelmer Vernooij <9648816b5a0c45426c88e14104568baf9283dd28@jelmer.uk>
