Skip to content

Commit

Permalink
drop goatcounter
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHicks committed Feb 28, 2024
1 parent 60f3193 commit 86a4905
Showing 1 changed file with 1 addition and 40 deletions.
41 changes: 1 addition & 40 deletions machines/gitea/default.nix
Expand Up @@ -27,7 +27,6 @@
environment.systemPackages = [
pkgs.comma
pkgs.goaccess
pkgs.goatcounter
pkgs.kakoune-unwrapped
pkgs.sysz
(
Expand Down Expand Up @@ -86,22 +85,17 @@
nixos root postgres
nixos postgres postgres
nixos gitea gitea
nixos goatcounter goatcounter
'';
authentication = "local all all ident map=nixos";

# I could have done all this by hand, but I didn't have to because Nixos is
# nice. ❤️
ensureDatabases = [ "gitea" "goatcounter" ];
ensureDatabases = [ "gitea" ];
ensureUsers = [
{
name = "gitea";
ensureDBOwnership = true;
}
{
name = "goatcounter";
ensureDBOwnership = true;
}
];
};

Expand Down Expand Up @@ -222,13 +216,6 @@

globalRedirect = "https://bytes.zone";
};

virtualHosts."stats.bytes.zone" = {
enableACME = true;
forceSSL = true;

locations."/".proxyPass = "http://localhost:8081";
};
};

security.acme = {
Expand Down Expand Up @@ -263,30 +250,4 @@
monthly = -1;
};
};

## goatcounter
users.groups.goatcounter = { };
users.users.goatcounter = {
isSystemUser = true;
group = "goatcounter";
};

systemd.services.goatcounter = {
description = "goatcounter, privacy-preserving web analytics";
documentation = [ "https://github.com/zgoat/goatcounter" ];

enable = true;

wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];

path = [ pkgs.goatcounter ];
script =
"goatcounter serve -automigrate -db 'postgres://user=goatcounter dbname=goatcounter host=/run/postgresql' -listen localhost:8081 -tls none";

serviceConfig = {
User = "goatcounter";
Group = "goatcounter";
};
};
}

0 comments on commit 86a4905

Please sign in to comment.