commit 8b0ef4bba2844bea02ea6a3bc23703d5d46699bb
parent b8254b952da932d7ce18067dc527ec1caa7d9afa
Author: rsiddharth <s@ricketyspace.net>
Date: Tue, 23 Jan 2018 01:55:24 +0000
propellor spin
Diffstat:
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/config.hs b/config.hs
@@ -50,6 +50,7 @@ import qualified Propellor.Property.File as File
import qualified Propellor.Property.Nginx as Nginx
import qualified Propellor.Property.Ssh as Ssh
import qualified Propellor.Property.Sudo as Sudo
+import qualified Propellor.Property.Systemd as Systemd
import qualified Propellor.Property.User as User
@@ -92,7 +93,7 @@ cygnus = host "cygnus.ricketyspace.net" $ props
, "udisks2", "etckeeper", "acpi-support"
, "ntp", "ntp-doc", "mosh", "dnsutils", "nscd"
, "nginx-full", "network-manager", "mailutils"
- , "postgresql", "postgresql-doc", "postgresql-client"
+ , "postgresql-doc", "postgresql-client"
, "alsa-utils", "pulseaudio"
, "mpd", "mpc", "ncmpcpp", "mplayer"
, "evince"
@@ -131,6 +132,8 @@ cygnus = host "cygnus.ricketyspace.net" $ props
& cygnusPgDump
-- chroots.
& Chroot.provisioned cygnusEmacsBuilder
+ -- containers.
+ & Systemd.nspawned cygnusPostgresContainer
-- root config.
& User.hasSomePassword (User "root")
& Ssh.authorizedKey (User "root") sCanonicalSshPubKey
@@ -290,7 +293,14 @@ cygnusPgDump = Cron.job "cygnusPgDump"
where
cmd = "./pgdump " ++ "s" ++ " " ++ pgDumpsDir
----- containers
+---- containers / chroots
+
+cygnusPostgresContainer :: Systemd.Container
+cygnusPostgresContainer = Systemd.debContainer "cygnus-postgres" $ props
+ & osDebian (Stable "stretch") X86_64
+ & Apt.stdSourcesList `onChange` Apt.upgrade
+ & Apt.cacheCleaned
+ & Apt.installed ["postgresql"]
cygnusEmacsBuilder :: Chroot.Chroot
cygnusEmacsBuilder = Chroot.debootstrapped Debootstrap.BuilddD dir $ props