nix

configuration files that power my machines
Log | Files | Refs | README | LICENSE

commit 2638e54f09fa3e0980e6039989ddbf755e5d2d10
parent bfeec750a2ae7dc5ef884aa7af99c70d60fe92b9
Author: mtmn <miro@haravara.org>
Date:   Tue, 14 Apr 2026 12:11:31 +0200

feat: add redlib container

Diffstat:
Mflake.nix | 1+
Mhosts/nixaran/configuration.nix | 0
Mmodules/services/redlib.nix | 21++++++++++++++++-----
3 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/flake.nix b/flake.nix @@ -172,6 +172,7 @@ "corpus-robo" "napkins" "listenbrainz-mpd" + "redlib" ] importService // { diff --git a/hosts/nixaran/configuration.nix b/hosts/nixaran/configuration.nix Binary files differ. diff --git a/modules/services/redlib.nix b/modules/services/redlib.nix @@ -7,6 +7,10 @@ in { options.services.haravara.redlib = { enable = lib.mkEnableOption "Redlib Reddit Frontend"; + port = lib.mkOption { + type = lib.types.port; + default = 7828; + }; domain = lib.mkOption { type = lib.types.str; }; @@ -18,10 +22,17 @@ in { }; config = lib.mkIf cfg.enable { - services.redlib = { - enable = false; - port = 7828; - address = "127.0.0.1"; + virtualisation.oci-containers = { + backend = "podman"; + + containers.redlib = { + image = "ghcr.io/silvenga/redlib:latest"; + ports = ["127.0.0.1:${toString cfg.port}:8080"]; + environment = { + REDLIB_DEFAULT_SHOW_NSFW = "off"; + REDLIB_DEFAULT_HIDE_HLS_NOTIFICATION = "on"; + }; + }; }; services.caddy.virtualHosts."${cfg.domain}".extraConfig = '' @@ -30,7 +41,7 @@ in { then "auth" else "auth_${cfg.authLabel}" }"} - reverse_proxy 127.0.0.1:7828 + reverse_proxy 127.0.0.1:${toString cfg.port} ''; }; }