diff options
author | Arun Isaac | 2023-08-14 22:28:04 +0100 |
---|---|---|
committer | Arun Isaac | 2023-08-14 22:29:05 +0100 |
commit | 7c8bc2c9eb661ee0468dd195ab6e8b7258662bc6 (patch) | |
tree | e08de50c646cf797248747b86c0916cd29e9ccca /doc/snippets/how-to-set-up-cgit.scm | |
parent | bd1c918c98e7e9ebe4e2068e6dd45538cd69e7d8 (diff) | |
download | guix-forge-7c8bc2c9eb661ee0468dd195ab6e8b7258662bc6.tar.gz guix-forge-7c8bc2c9eb661ee0468dd195ab6e8b7258662bc6.tar.lz guix-forge-7c8bc2c9eb661ee0468dd195ab6e8b7258662bc6.zip |
doc: Add cgit setup how to.
* doc/forge.skb (How To): New chapter.
* doc/snippets/acme-staging-url.scm,
doc/snippets/how-to-set-up-cgit.scm: New files.
* tissue.scm (#:indexed-documents): Index chapter-how-to.
Diffstat (limited to 'doc/snippets/how-to-set-up-cgit.scm')
-rw-r--r-- | doc/snippets/how-to-set-up-cgit.scm | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/doc/snippets/how-to-set-up-cgit.scm b/doc/snippets/how-to-set-up-cgit.scm new file mode 100644 index 0000000..8bb1975 --- /dev/null +++ b/doc/snippets/how-to-set-up-cgit.scm @@ -0,0 +1,38 @@ +(use-modules (gnu) + ((gnu packages admin) #:select (shepherd)) + (forge acme) + (forge cgit) + (forge nginx) + (forge socket)) + +(operating-system + (host-name "forge") + (timezone "UTC") + (locale "en_US.utf8") + (bootloader (bootloader-configuration + (bootloader grub-bootloader) + (targets (list "/dev/sdX")))) + (file-systems %base-file-systems) + (sudoers-file + (mixed-text-file "sudoers" + "@include " %sudoers-specification + ;; Permit the acme user to restart nginx. + "\nacme ALL = NOPASSWD: " + (file-append shepherd "/bin/herd") + " restart nginx\n")) + (services (cons* (service cgit-service-type + (cgit-configuration + (server-name "git.example.org") + (repository-directory "/srv/git"))) + (service forge-nginx-service-type + (forge-nginx-configuration + (http-listen (forge-ip-socket + (ip "0.0.0.0") + (port 8080))) + (https-listen (forge-ip-socket + (ip "0.0.0.0") + (port 4443))))) + (service acme-service-type + (acme-configuration + (email "foo@example.org"))) + %base-services))) |