dotfiles/nixos/boxes/vpsfree1/rss.nix

64 lines
1.6 KiB
Nix
Raw Normal View History

2022-10-22 20:34:06 +01:00
{ config, pkgs, inputs, lib, ... }:
let
port = 8080;
domain = "news.cyplo.dev";
in {
imports = [ ../nginx.nix ];
services.nginx = {
virtualHosts = {
"${domain}" = {
forceSSL = true;
enableACME = true;
locations."/" = { proxyPass = "http://127.0.0.1:" + toString port; };
2022-10-22 20:34:06 +01:00
};
};
};
containers.rss = {
autoStart = true;
forwardPorts = [{
containerPort = port;
hostPort = port;
}];
config = { config, pkgs, ... }:
let
2022-11-08 17:06:20 +00:00
inherit (config.services.tt-rss) pool;
inherit (config.services.tt-rss) root;
in {
2022-10-23 11:22:19 +01:00
system.stateVersion = "22.05";
2022-10-22 20:34:06 +01:00
services.tt-rss = {
enable = true;
selfUrlPath = "https://${domain}";
virtualHost = null;
2022-10-22 23:06:34 +01:00
registration.enable = false;
2022-12-03 21:37:07 +00:00
simpleUpdateMode = true;
2022-10-22 20:34:06 +01:00
};
services.nginx = {
enable = true;
virtualHosts = {
"${domain}" = {
listen = [{
2022-11-08 17:06:20 +00:00
inherit port;
2022-10-22 20:34:06 +01:00
addr = "0.0.0.0";
}];
root = "${root}/www";
locations."/" = { index = "index.php"; };
locations."^~ /feed-icons" = { root = "${root}"; };
locations."~ \\.php$" = {
extraConfig = ''
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:${
config.services.phpfpm.pools.${pool}.socket
};
fastcgi_index index.php;
'';
};
};
};
};
};
};
}