+ # services.chirp = {
+ # enable = true;
+ # };
+ users.users.chirp = {
+ isSystemUser = true;
+ group = "chirp";
+ home = "/var/lib/chirp";
+ createHome = true;
+ };
+ users.groups.chirp = {};
+
+ systemd.services.chirp = {
+ description = "Chirp SystemD Service";
+ wantedBy = ["multi-user.target"];
+ after = ["network.target"];
+ serviceConfig = {
+ WorkingDirectory = "/var/lib/chirp";
+ ExecStart = "${chirp.packages.${pkgs.system}.default}/bin/chirp";
+ Restart = "always";
+ Type = "simple";
+ User = "chirp";
+ Group = "chirp";
+ };
+ };
+
+ services.gitDaemon = {
+ enable = true;
+ basePath = "/srv/git";
+ repositories = [ "/srv/git" ];
+ exportAll = true;
+ port = 9418;
+ };
+
+ services.lighttpd = {
+ enable = true;
+ document-root = "/srv/www";
+ port = 8082;
+
+ cgit = {
+ enable = true;
+ subdir = "cgit";
+ configText = ''
+ scan-path=/srv/git
+ robots=noindex, nofollow
+ '';
+ };
+ gitweb.enable = true;
+ };
+ users.users."lighttpd".extraGroups = [ "git" ];
+
+ services.gitweb = {
+ gitwebTheme = false;
+ projectroot = "/srv/git";
+ };
+