/ config.hs
config.hs
 1  -- This is the main configuration file for Propellor, and is used to build
 2  -- the propellor program.
 3  
 4  import Propellor
 5  import qualified Propellor.Property.Apt as Apt
 6  import qualified Propellor.Property.Brew as Brew
 7  import qualified Propellor.Property.Cron as Cron
 8  import qualified Propellor.Property.File as File
 9  import qualified Propellor.Property.User as User
10  
11  main :: IO ()
12  main = defaultMain hosts
13  
14  -- The hosts propellor knows about.
15  hosts :: [Host]
16  hosts =
17      [ mybox
18      , mymac
19      , mac_mini_2
20      ]
21  
22  -- An example host.
23  mybox :: Host
24  mybox =
25      host "mybox.example.com" $
26          props
27              & osDebian Unstable X86_64
28              & Apt.stdSourcesList
29              & Apt.unattendedUpgrades
30              & Apt.installed ["etckeeper"]
31              & Apt.installed ["ssh"]
32              & User.hasSomePassword (User "root")
33              & File.dirExists "/var/www"
34              & Cron.runPropellor (Cron.Times "30 * * * *")
35  
36  -- An example host.
37  mymac :: Host
38  mymac =
39      host "mac-mini.local" $
40          props
41              & osDarwin ARM64
42              & User.spinUser (User "arnaudbailly")
43              & Brew.installed "git"
44              & Brew.installed "htop"
45  
46  mac_mini_2 :: Host
47  mac_mini_2 =
48      host "mac-mini-2.local" $
49          props
50              & osDarwin ARM64
51              & User.spinUser (User "arnaud")
52              & Brew.installed "git"
53              & Brew.installed "sqlite"
54              & Brew.installed "htop"