ng0 <n...@we.make.ritual.n0.is> writes:
>> From d1d7eb59ca53833098cea2d6eddaa59f1494b579 Mon Sep 17 00:00:00 2001 >> From: ng0 <n...@we.make.ritual.n0.is> >> Date: Fri, 8 Jul 2016 15:42:55 +0000 >> Subject: [PATCH] gnu: services: Add git-service. >> >> * gnu/services/version-control.scm: New file, create it. >> (git-service): New Procedures. >> (git-service-type): New variable. >> * doc/guix.texi: Add documentation. I think it should be: * doc/guix.text (Services)(Version Control): New section. > [...] >> +(define %git-accounts >> + ;; User account and groups for git-daemon. >> + (list (user-group >> + (name "git") >> + (system? #t)) >> + (user-account >> + (name "git") >> + (system? #t) >> + (group "git") >> + (comment "Shepherd created user for the git-daemon service") >> + (home-directory "/var/git") I think it doesn't need a home directory. >> + (shell #~(string-append #$shadow "/bin/git-shell"))))) Use 'nologin' should be enough, according to `man git-shell', it's for SSH access. Also, it seems this 'git' user is not used anywhere, it should be passed as the '--user' argument to 'git daemon' or as '#:user' to 'make-forkexec-constructor'. >> + >> +(define (git-activation config) >> + "Return the activation gexp for CONFIG." >> + #~(begin (use-modules (guix build utils)) >> + ;; Create the default base-directory, see `man git daemon'. >> + (mkdir-p "/var/git/repositories"))) This should create the 'git-configuration-base-directory' of config, and make sure it's readable by the 'git' user. >> +(define* (git-service #:key >> + (git git) >> + (base-directory "/var/git/repositories") >> + (user-directory? #f) >> + (user-directory? "") >> + (directory? #f) >> + (directory "") >> + (port 9418) >> + (pid-file? #t) >> + (pid-file "/var/run/git-daemon.pid") >> + (max-connections 32)) This should just accept a <git-configuration> object, and document it in the manaual (no need to make detail comments in the git-command, which I think a mention to `man git-daemon' is fine there). For testing, I guess 'git clone git://localhost/xxx' in the VM is enough. And the patch doesn't apply for me, can you send an update one?