2022-12-06 08:01:17 -08:00
|
|
|
{ self, config, lib, pkgs, ... }:
|
2022-11-30 22:33:07 -08:00
|
|
|
|
|
|
|
{
|
2022-12-04 21:07:27 -08:00
|
|
|
age.secrets.freshrss-dbpass.file = "${self}/secrets/freshrss-dbpass.age";
|
|
|
|
age.secrets.freshrss-dbpass.owner = "freshrss";
|
2022-11-30 22:33:07 -08:00
|
|
|
services.freshrss = {
|
|
|
|
enable = true;
|
|
|
|
virtualHost = "rss.sealight.xyz";
|
|
|
|
baseUrl = "https://rss.sealight.xyz/";
|
2022-12-06 08:01:17 -08:00
|
|
|
passwordFile = "/run/agenix/freshrss-dbpass";
|
2022-11-30 22:33:07 -08:00
|
|
|
database = {
|
|
|
|
type = "pgsql";
|
2022-12-04 21:07:27 -08:00
|
|
|
passFile = "/run/agenix/freshrss-dbpass";
|
2022-12-07 04:30:25 -08:00
|
|
|
port = 5432;
|
2022-11-30 22:33:07 -08:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services.postgresql = {
|
|
|
|
enable = true; # Ensure postgresql is enabled
|
2024-03-15 23:25:49 -07:00
|
|
|
# authentication = ''
|
|
|
|
# local freshrss all ident map=freshrss-users
|
|
|
|
# '';
|
|
|
|
# identMap = # Map the freshrss user to postgresql
|
|
|
|
# ''
|
|
|
|
# freshrss-users freshrss freshrss
|
|
|
|
# freshrss-users postgres freshrss
|
|
|
|
# '';
|
2022-12-07 02:10:15 -08:00
|
|
|
ensureDatabases = [ "freshrss" ];
|
2024-01-05 23:44:08 -08:00
|
|
|
ensureUsers = [{
|
|
|
|
name = "freshrss";
|
|
|
|
ensureDBOwnership = true;
|
|
|
|
}];
|
2022-12-07 04:30:25 -08:00
|
|
|
# TODO
|
2023-05-30 05:23:05 -07:00
|
|
|
# initialScript # set password for freshrss user
|
2022-12-07 04:30:25 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
services.nginx.virtualHosts."rss.sealight.xyz" = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
2022-11-30 22:33:07 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
|
|
|
security.acme.defaults.email = "anish+acme@lakhwara.com";
|
|
|
|
security.acme.acceptTerms = true;
|
|
|
|
}
|