This commit is contained in:
Joey Hess 2014-03-30 16:15:27 -04:00
parent afb7afee0c
commit af5e56ff24
Failed to extract signature
1 changed files with 8 additions and 4 deletions

View File

@ -19,17 +19,20 @@ getProperties :: HostName -> [Property]
getProperties hostname@"clam.kitenet.net" = getProperties hostname@"clam.kitenet.net" =
[ cleanCloudAtCost hostname [ cleanCloudAtCost hostname
, standardSystem Apt.Unstable , standardSystem Apt.Unstable
-- Clam is a tor bridge.
, Tor.isBridge
-- This is not an important system so I don't want to need to -- This is not an important system so I don't want to need to
-- manually upgrade it. -- manually upgrade it.
, Apt.unattendedUpgrades True , Apt.unattendedUpgrades True
-- Clam is a tor bridge.
, Tor.isBridge
-- Should come last as it reboots. -- Should come last as it reboots.
, Apt.installed ["systemd-sysv"] `onChange` Reboot.now , Apt.installed ["systemd-sysv"] `onChange` Reboot.now
] ]
-- add more hosts here... -- add more hosts here...
--getProperties "foo" = --getProperties "foo" =
getProperties h = error $ "Unknown host: " ++ h ++ " (perhaps you should specify the real hostname on the command line?)" getProperties h = error $ unwords
[ "Unknown host:", h
, "(perhaps you should specify the real hostname on the command line?)"
]
-- This is my standard system setup -- This is my standard system setup
standardSystem :: Apt.Suite -> Property standardSystem :: Apt.Suite -> Property
@ -51,13 +54,14 @@ standardSystem suite = propertyList "standard system"
, "/etc/sudoers" `File.containsLine` "joey ALL=(ALL:ALL) NOPASSWD:ALL" , "/etc/sudoers" `File.containsLine` "joey ALL=(ALL:ALL) NOPASSWD:ALL"
`describe` "sudoer joey" `describe` "sudoer joey"
, GitHome.installedFor "joey" , GitHome.installedFor "joey"
-- I use postfix, or no MTA.
, Apt.removed ["exim4"] `onChange` Apt.autoRemove
] ]
-- Clean up a system as installed by cloudatcost.com -- Clean up a system as installed by cloudatcost.com
cleanCloudAtCost :: HostName -> Property cleanCloudAtCost :: HostName -> Property
cleanCloudAtCost hostname = propertyList "cloudatcost cleanup" cleanCloudAtCost hostname = propertyList "cloudatcost cleanup"
[ User.nuked "user" [ User.nuked "user"
, Apt.removed ["exim4"] `onChange` Apt.autoRemove
, Hostname.set hostname , Hostname.set hostname
, Ssh.uniqueHostKeys , Ssh.uniqueHostKeys
, "/etc/default/grub" `File.containsLine` "GRUB_DISABLE_LINUX_UUID=true" , "/etc/default/grub" `File.containsLine` "GRUB_DISABLE_LINUX_UUID=true"