10 cfg = config.services.svnserve;
22 enable = lib.mkOption {
23 type = lib.types.bool;
25 description = "Whether to enable svnserve to serve Subversion repositories through the SVN protocol.";
28 svnBaseDir = lib.mkOption {
31 description = "Base directory from which Subversion repositories are accessed.";
39 config = lib.mkIf cfg.enable {
40 systemd.services.svnserve = {
41 after = [ "network.target" ];
42 wantedBy = [ "multi-user.target" ];
43 preStart = "mkdir -p ${cfg.svnBaseDir}";
44 script = "${pkgs.subversion.out}/bin/svnserve -r ${cfg.svnBaseDir} -d --foreground --pid-file=/run/svnserve.pid";