diff options
| author | Mel <einebeere@gmail.com> | 2024-12-08 03:34:42 +0100 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2024-12-08 03:34:55 +0100 |
| commit | 3ffb1a24cba360070727c250aa93eca343c7da62 (patch) | |
| tree | b171471d40d2b0dbac6e0288a08d32c58b7c333b /services | |
| parent | f98c19100ac3eb73690e2654e6b1fe6b0eed1763 (diff) | |
| download | network-3ffb1a24cba360070727c250aa93eca343c7da62.tar.zst network-3ffb1a24cba360070727c250aa93eca343c7da62.zip | |
Partially working FreshRSS service
Signed-off-by: Mel <einebeere@gmail.com>
Diffstat (limited to 'services')
| -rw-r--r-- | services/freshrss.nix | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/services/freshrss.nix b/services/freshrss.nix new file mode 100644 index 0000000..bdb087f --- /dev/null +++ b/services/freshrss.nix @@ -0,0 +1,44 @@ +{ me, pkgs, auxiliaryPkgs, ... }: + +let + inherit (pkgs) php lighttpd freshrss dockerTools; + inherit (auxiliaryPkgs) common; + + freshrssLocalPort = 1819; + freshrssDir = "/srv/freshrss"; + + freshrssImage = dockerTools.streamLayeredImage { + name = "freshrss"; + tag = freshrss.version; + fromImage = common.alpine.base; + + contents = [ lighttpd freshrss php ]; + + extraCommands = '' + mkdir -p ./opt ./var/log/lighttpd + touch ./var/log/lighttpd/access.log ./var/log/lighttpd/error.log + ln -s ${freshrss} ./opt/freshrss + ''; + }; + +in +{ + # TODO: ..it won't work without cron :3 + foundation.services.freshrss = { + image = freshrssImage; + ports = [ + (common.tailnetPort me [ freshrssLocalPort 80 ]) + ]; + + volumes = [ + [ "${freshrssDir}/lighttpd.conf" "/etc/lighttpd/freshrss.conf" ] + [ "${freshrssDir}/data" "/opt/freshrss/data" ] + ]; + + entrypoint = "${lighttpd}/bin/lighttpd"; + cmd = [ + "-D" # run in foreground + "-f" "/etc/lighttpd/freshrss.conf" + ]; + }; +} |
