nixos/lighttpd: move cgit setup to cgit.nix

To where it really belongs. Separation of concern.

Changed files
+5 -6
nixos
modules
services
web-servers
+5
nixos/modules/services/web-servers/lighttpd/cgit.nix
···
}
'';
};
}
···
}
'';
+
systemd.services.lighttpd.preStart = ''
+
mkdir -p /var/cache/cgit
+
chown lighttpd:lighttpd /var/cache/cgit
+
'';
+
};
}
-6
nixos/modules/services/web-servers/lighttpd/default.nix
···
description = "Lighttpd Web Server";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
-
preStart = ''
-
${if cfg.cgit.enable then ''
-
mkdir -p /var/cache/cgit
-
chown lighttpd:lighttpd /var/cache/cgit
-
'' else ""}
-
'';
serviceConfig.ExecStart = "${pkgs.lighttpd}/sbin/lighttpd -D -f ${configFile}";
# SIGINT => graceful shutdown
serviceConfig.KillSignal = "SIGINT";
···
description = "Lighttpd Web Server";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig.ExecStart = "${pkgs.lighttpd}/sbin/lighttpd -D -f ${configFile}";
# SIGINT => graceful shutdown
serviceConfig.KillSignal = "SIGINT";