A collection of example NixOS files that be included into configuration.nix on NixOS.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

tt-rss_for_NixOps.nix 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # NixOps configuration for the hosts running Tiny Tiny RSS (TT-RSS)
  2. #
  3. # Will need to be used with an appropriate secrets file. See: ../secrets.nix
  4. { config, pkgs, lib, ... }:
  5. {
  6. services.tt-rss = {
  7. enable = true; # Enable TT-RSS
  8. database = { # Configure the database
  9. type = "pgsql"; # Database type
  10. passwordFile = "/run/keys/tt-rss-dbpass"; # Where to find the password
  11. };
  12. email = {
  13. fromAddress = "news@mydomain"; # Address for outgoing email
  14. fromName = "News at mydomain"; # Display name for outgoing email
  15. };
  16. selfUrlPath = "https://news.mydomain/"; # Root web URL
  17. virtualHost = "news.mydomain"; # Setup a virtualhost
  18. };
  19. services.postgresql = {
  20. enable = true; # Ensure postgresql is enabled
  21. authentication = ''
  22. local tt_rss all ident map=tt_rss-users
  23. '';
  24. identMap = # Map the tt-rss user to postgresql
  25. ''
  26. tt_rss-users tt_rss tt_rss
  27. '';
  28. };
  29. services.nginx = {
  30. enable = true; # Enable Nginx
  31. recommendedGzipSettings = true;
  32. recommendedOptimisation = true;
  33. recommendedProxySettings = true;
  34. recommendedTlsSettings = true;
  35. virtualHosts."news.mydomain" = { # TT-RSS hostname
  36. enableACME = true; # Use ACME certs
  37. forceSSL = true; # Force SSL
  38. };
  39. };
  40. security.acme.certs = {
  41. "news.mydomain".email = "email@mydomain";
  42. };
  43. }