helm/profiles/freshrss/default.nix

37 lines
1,018 B
Nix
Raw Permalink Normal View History

2022-11-30 22:33:07 -08:00
{ config, lib, pkgs, ... }:
{
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/";
database = {
type = "pgsql";
2022-12-04 21:07:27 -08:00
passFile = "/run/agenix/freshrss-dbpass";
2022-11-30 22:33:07 -08:00
};
};
services.postgresql = {
enable = true; # Ensure postgresql is enabled
package = pkgs.postgresql_11;
authentication = ''
local freshrss all ident map=freshrss-users
'';
identMap = # Map the gitea user to postgresql
''
freshrss-users freshrss freshrss
'';
# TODO with password
# ensureDatabases = [ "freshrss" ];
ensureUsers = [
{ name = "freshrss"; ensurePermissions."DATABASE freshrss" = "ALL PRIVILEGES"; }
];
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
security.acme.defaults.email = "anish+acme@lakhwara.com";
security.acme.acceptTerms = true;
}