nix-config/hosts/nixedo/modules/freshrss.nix
Oliver Davies a7ef7eeb90
All checks were successful
/ check (push) Successful in 38s
nixedo: re-add FreshRSS
Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
2025-11-04 21:50:55 +00:00

45 lines
766 B
Nix

{
config,
lib,
...
}:
let
inherit (lib)
mkEnableOption
mkIf
mkOption
types
;
cfg = homelab.services.${service};
homelab = config.homelab;
service = "freshrss";
in
{
options.homelab.services.${service} = {
enable = mkEnableOption "Enable ${service}";
url = mkOption {
default = "freshrss.${homelab.domain}";
type = types.str;
};
};
config = mkIf cfg.enable {
services = {
${service} = {
enable = true;
baseUrl = "https://${cfg.url}";
passwordFile = config.age.secrets.freshrss-password-file.path;
virtualHost = cfg.url;
};
nginx.virtualHosts.${cfg.url} = {
useACMEHost = homelab.domain;
forceSSL = true;
};
};
};
}