summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/SiteSpecific
diff options
context:
space:
mode:
authorJoey Hess2017-03-08 14:07:34 -0400
committerJoey Hess2017-03-08 14:07:34 -0400
commita50b512564cf4a586106a649cb28f66180bb5564 (patch)
tree86e9f7300fc9581a7fcb613a5ecd1a707a1f8f1e /src/Propellor/Property/SiteSpecific
parent005e6985dca760bced6e6f2af5df4a0a5cadb0e3 (diff)
propellor spin
Diffstat (limited to 'src/Propellor/Property/SiteSpecific')
-rw-r--r--src/Propellor/Property/SiteSpecific/JoeySites.hs28
1 files changed, 17 insertions, 11 deletions
diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs
index c4f0e352..c84644cb 100644
--- a/src/Propellor/Property/SiteSpecific/JoeySites.hs
+++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs
@@ -228,23 +228,29 @@ gitServer hosts = propertyList "git.kitenet.net setup" $ props
`requires` Ssh.knownHost hosts "usw-s002.rsync.net" (User "root")
`requires` Ssh.authorizedKeys (User "family") (Context "git.kitenet.net")
`requires` User.accountFor (User "family")
- & Apt.installed ["git", "rsync", "gitweb"]
+ & Apt.installed ["git", "rsync", "cgit"]
& Apt.installed ["git-annex"]
& Apt.installed ["kgb-client"]
& File.hasPrivContentExposed "/etc/kgb-bot/kgb-client.conf" anyContext
`requires` File.dirExists "/etc/kgb-bot/"
& Git.daemonRunning "/srv/git"
- & "/etc/gitweb.conf" `File.containsLines`
- [ "$projectroot = '/srv/git';"
- , "@git_base_url_list = ('https://git.joeyh.name/git', 'git://git.joeyh.name', 'ssh://git.joeyh.name/srv/git');"
- , "# disable snapshot download; overloads server"
- , "$feature{'snapshot'}{'default'} = [];"
+ & "/etc/cgitrc" `File.hasContent`
+ [ "clone-url=https://git.joeyh.name/git/$CGIT_REPO_URL git://git.joeyh.name/$CGIT_REPO_URL"
+ , "css=/cgit-css/cgit.css"
+ , "logo=/cgit-css/cgit.png"
+ , "enable-http-clone=1"
+ , "root-title=Joey's git repositories"
+ , "root-desc="
+ , "enable-index-owner=0"
+ , "snapshots=tar.gz"
+ , "enable-git-config=1"
+ , "scan-path=/srv/git"
]
- `describe` "gitweb configured"
- -- Repos push on to github.
- & Ssh.knownHost hosts "github.com" (User "joey")
- -- I keep the website used for gitweb checked into git..
+ `describe` "cgit configured"
+ -- I keep the website used for git.kitenet.net/git.joeyh.name checked into git..
& Git.cloned (User "root") "/srv/git/joey/git.kitenet.net.git" "/srv/web/git.kitenet.net" Nothing
+ -- Don't need global apache configuration for cgit.
+ ! Apache.confEnabled "cgit"
& website "git.kitenet.net"
& website "git.joeyh.name"
& Apache.modEnabled "cgi"
@@ -256,7 +262,7 @@ gitServer hosts = propertyList "git.kitenet.net setup" $ props
, " Options Indexes ExecCGI FollowSymlinks"
, " AllowOverride None"
, " AddHandler cgi-script .cgi"
- , " DirectoryIndex index.cgi"
+ , " DirectoryIndex cgit.cgi"
, Apache.allowAll
, " </Directory>"
, ""