summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config-joey.hs1
-rw-r--r--src/Propellor/Property/SiteSpecific/JoeySites.hs11
2 files changed, 12 insertions, 0 deletions
diff --git a/config-joey.hs b/config-joey.hs
index c08eadaf..74ad9e9a 100644
--- a/config-joey.hs
+++ b/config-joey.hs
@@ -195,6 +195,7 @@ hosts = -- (o) `
& alias "eubackup.kitenet.net"
& Apt.installed ["obnam", "sshfs", "rsync"]
& JoeySites.githubBackup
+ & JoeySites.obnamRepos ["wren", "pell"]
& alias "podcatcher.kitenet.net"
& Apt.installed ["git-annex"]
diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs
index b44401ea..c66c167d 100644
--- a/src/Propellor/Property/SiteSpecific/JoeySites.hs
+++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs
@@ -338,3 +338,14 @@ githubBackup = propertyList "github-backup box"
in File.hasPrivContent f
`onChange` File.ownerGroup f "joey" "joey"
]
+
+obnamRepos :: [String] -> Property
+obnamRepos rs = propertyList ("obnam repos for " ++ unwords rs)
+ (mkbase : map mkrepo rs)
+ where
+ mkbase = mkdir "/home/joey/lib"
+ `before` mkdir "/home/joey/backup"
+ mkrepo r = mkdir ("/home/joey/lib/nackup/" ++ r ++ ".obnam")
+ mkdir d = File.dirExists d
+ `before` File.ownerGroup "joey" "joey" d
+