diff --git a/config-joey.hs b/config-joey.hs index c08eada..74ad9e9 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 b44401e..c66c167 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 +