aboutsummaryrefslogtreecommitdiff
path: root/modules/rss/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/rss/default.nix')
-rw-r--r--modules/rss/default.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/modules/rss/default.nix b/modules/rss/default.nix
new file mode 100644
index 0000000..9473c30
--- /dev/null
+++ b/modules/rss/default.nix
@@ -0,0 +1,31 @@
+{ pkgs, settings, phenax-yayarr, ... }@attrs:
+let
+ ports = settings.network.ports;
+ yarr = settings.yarr;
+ utils = import ./utils.nix attrs;
+
+ yarrSetupScript = utils.createYarrSetupScript {
+ inherit (yarr) username api_key;
+ api_url = "http://localhost:${toString ports.yarr}";
+ feeds = import ./feeds.nix;
+ settings = {
+ theme_font = "monospace";
+ theme_name = "night";
+ theme_size = 1.1;
+ refresh_rate = 30;
+ };
+ };
+in
+{
+ services.yarr = {
+ enable = true;
+ port = ports.yarr;
+ address = "0.0.0.0";
+ package = phenax-yayarr;
+ authFilePath = pkgs.writeText "yarr-auth" ''${yarr.username}:${yarr.password}'';
+ };
+
+ networking.firewall.allowedTCPPorts = [ ports.yarr ];
+
+ environment.systemPackages = [ yarrSetupScript ];
+}