lohr: setup dev service
This commit is contained in:
parent
6e894260e5
commit
9d2073011b
|
@ -78,6 +78,10 @@ in
|
|||
enable = true;
|
||||
};
|
||||
|
||||
lohr = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
miniflux = {
|
||||
enable = true;
|
||||
adminCredentialsFile = "${../../secrets/miniflux-admin-credentials.secret}";
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
./fail2ban.nix
|
||||
./gitea.nix
|
||||
./jellyfin.nix
|
||||
./lohr.nix
|
||||
./matrix.nix
|
||||
./media.nix
|
||||
./miniflux.nix
|
||||
|
|
37
services/lohr.nix
Normal file
37
services/lohr.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.my.services.lohr;
|
||||
my = config.my;
|
||||
domain = config.networking.domain;
|
||||
in
|
||||
{
|
||||
options.my.services.lohr = {
|
||||
enable = lib.mkEnableOption "Lohr Mirroring Daemon";
|
||||
|
||||
home = mkOption {
|
||||
type = types.str;
|
||||
default = "/var/lib/lohr";
|
||||
example = "/var/lib/lohr";
|
||||
description = "Home for the lohr service, where data will be stored";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.nginx.virtualHosts = {
|
||||
"lohr.${domain}" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
|
||||
locations."/" = {
|
||||
proxyPass = let
|
||||
laptopClientNum = my.secrets.wireguard.peers.laptop.clientNum;
|
||||
in
|
||||
"http://10.0.0.${toString laptopClientNum}:8000";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue