helm/hosts/profiles/freshrss/default.nix
2022-12-07 02:01:17 +10:00

38 lines
1 KiB
Nix

{ self, config, lib, pkgs, ... }:
{
age.secrets.freshrss-dbpass.file = "${self}/secrets/freshrss-dbpass.age";
age.secrets.freshrss-dbpass.owner = "freshrss";
services.freshrss = {
enable = true;
virtualHost = "rss.sealight.xyz";
baseUrl = "https://rss.sealight.xyz/";
passwordFile = "/run/agenix/freshrss-dbpass";
database = {
type = "pgsql";
passFile = "/run/agenix/freshrss-dbpass";
};
};
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;
}