# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
-{ config, lib, pkgs, ... }:
+{ config, lib, pkgs, chirp, ... }:
{
imports =
services.caddy = {
enable = true;
virtualHosts."psch.dev".extraConfig = ''
- respond hello :D
+ respond "hello :D"
'';
virtualHosts."chirp.psch.dev".extraConfig = ''
- reverse_proxy http://localhost:8080
+ reverse_proxy http://localhost:8080 {
+ request_buffers 8192
+ }
tls {
protocols tls1.3 tls1.3
}
'';
+ virtualHosts."git.psch.dev".extraConfig = ''
+ '';
};
- services.dbus.enable = true;
-
- # virtualHosts."git.psch.dev".extraConfig = ''
- # reverse_proxy unix//run/fcgiwrap.socket {
- # transport fastcgi {
- # split .cgi
- # }
- # }
- # '';
-
# 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."cgit".cgit = {
- # enable = true;
- # scanPath = "/srv/git";
- # };
+ services.gitDaemon = {
+ enable = true;
+ basePath = "/srv/git";
+ repositories = [ "/srv/git" ];
+ exportAll = true;
+ port = 9418;
+ };
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];