dotfiles/modules/services/libreddit.nix

43 lines
806 B
Nix
Raw Normal View History

2023-03-19 16:30:26 +01:00
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.modules.services.libreddit;
in {
options.modules.services.libreddit = {
enable = mkOption {
type = types.bool;
default = false;
};
domain = mkOption {
type = types.str;
default = "libreddit.oat.zone";
};
port = mkOption {
type = types.port;
default = 1590;
};
};
2023-04-21 15:40:27 +02:00
/*
2023-03-19 16:30:26 +01:00
config = mkIf cfg.enable {
services = {
libreddit = {
enable = true;
package = pkgs.libreddit;
port = cfg.port;
};
nginx.enable = true;
nginx.virtualHosts."${cfg.domain}" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:${toString cfg.port}";
};
};
};
};
2023-04-21 15:40:27 +02:00
*/
2023-03-19 16:30:26 +01:00
}