Returning an error after trying to log in when the page is served via a Cloudflare Tunnel.
This commit is contained in:
parent
9423f635bc
commit
00015d8948
5 changed files with 86 additions and 0 deletions
|
@ -15,6 +15,7 @@
|
||||||
immich.enable = true;
|
immich.enable = true;
|
||||||
jellyfin.enable = true;
|
jellyfin.enable = true;
|
||||||
paperless.enable = true;
|
paperless.enable = true;
|
||||||
|
peertube.enable = false;
|
||||||
tubearchivist.enable = true;
|
tubearchivist.enable = true;
|
||||||
uptime-kuma.enable = true;
|
uptime-kuma.enable = true;
|
||||||
vaultwarden.enable = true;
|
vaultwarden.enable = true;
|
||||||
|
|
|
@ -28,5 +28,6 @@ with lib;
|
||||||
./jellyfin.nix
|
./jellyfin.nix
|
||||||
./nginx
|
./nginx
|
||||||
./paperless.nix
|
./paperless.nix
|
||||||
|
./peertube.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
62
hosts/nixedo/modules/peertube.nix
Normal file
62
hosts/nixedo/modules/peertube.nix
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib)
|
||||||
|
mkEnableOption
|
||||||
|
mkIf
|
||||||
|
mkOption
|
||||||
|
types
|
||||||
|
;
|
||||||
|
|
||||||
|
cfg = homelab.services.${service};
|
||||||
|
homelab = config.homelab;
|
||||||
|
service = "peertube";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.homelab.services.${service} = {
|
||||||
|
enable = mkEnableOption "Enable ${service}";
|
||||||
|
|
||||||
|
url = mkOption {
|
||||||
|
default = "videos.${homelab.domain}";
|
||||||
|
type = types.str;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services = {
|
||||||
|
${service} = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
configureNginx = true;
|
||||||
|
enableWebHttps = false;
|
||||||
|
listenWeb = 80;
|
||||||
|
localDomain = cfg.url;
|
||||||
|
|
||||||
|
database = {
|
||||||
|
createLocally = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
redis = {
|
||||||
|
createLocally = true;
|
||||||
|
enableUnixSocket = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
secrets.secretsFile = config.age.secrets.peertube-env.path;
|
||||||
|
};
|
||||||
|
|
||||||
|
cloudflared.tunnels.${homelab.cloudflared.tunnelId}.ingress = {
|
||||||
|
${cfg.url} = "http://${toString config.services.${service}.listenWeb}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
age.secrets."${service}-env" = {
|
||||||
|
file = "${inputs.self}/secrets/${service}-env.age";
|
||||||
|
owner = config.services.${service}.user;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -24,6 +24,10 @@ in
|
||||||
hosts.nixedo
|
hosts.nixedo
|
||||||
] ++ [ users.opdavies ];
|
] ++ [ users.opdavies ];
|
||||||
|
|
||||||
|
"secrets/peertube-env.age".publicKeys = [
|
||||||
|
hosts.nixedo
|
||||||
|
] ++ [ users.opdavies ];
|
||||||
|
|
||||||
"secrets/tubearchivist-env.age".publicKeys = [
|
"secrets/tubearchivist-env.age".publicKeys = [
|
||||||
hosts.nixedo
|
hosts.nixedo
|
||||||
hosts.t480
|
hosts.t480
|
||||||
|
|
18
secrets/peertube-env.age
Normal file
18
secrets/peertube-env.age
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
age-encryption.org/v1
|
||||||
|
-> ssh-ed25519 IsVD3g kyLYyMMYENXy2F1cnjVyptUhci5xfC8yrhvBtH8THUw
|
||||||
|
Q8sXfg7Wm4UMZ6jWGiBLgEKOqVvlCrHy8IthdpjRS/8
|
||||||
|
-> ssh-rsa +vTWQw
|
||||||
|
i0sLs+iG1P7pvUAHCn1StChdaMlT+ze4qkI0beSzTbWm6+qoC7X9tBoJoBJbNGmQ
|
||||||
|
vIaJpYncYUn04r4WrYcjhBaYKYoECPGR0z/i9EtPT67DG6zuNEJLTclMStdudv4P
|
||||||
|
Y5uHDku3CoEF6l1nBabQmYtA6/7RT/wqQf+yYICp8pJX9fPtgkjbUtwx/EBOTz29
|
||||||
|
t1Y6USjHI45IW9Od3G7XcZGuNkLkeV3clBEqWiFeck7+x3/SU8f8sv63M++Bitqb
|
||||||
|
F/ZXiLd/JDrlRhcgO0XsfKX+M6eodUg3ZQ7/0GFAjfYyiQp6uA5p/srIuTq40W1f
|
||||||
|
i7zzs0dewz75GjSKIWyivcYvQQzeobxDd6/1nhgtdjHCYyL5HV3QnE7Ew/ZoQPss
|
||||||
|
kIr25ftZ/sA87wg77J0c7koZneycSV1PioB2RyuW7cXP4ptMUOEaM0KjkLABBWNF
|
||||||
|
+WxIdGVd8d8E/zBbVnNNPNuKZYHEb6+eCo61Z8x7VAZhz61ziXOdOzeaN1Obgv+2
|
||||||
|
Banoulrje4oF1L4KgO64NckVpYi6Od0Cl9W0hOxSt1BafokHYi4yxYiB2rmv/cdO
|
||||||
|
Q2IR10fKCd1BNYKvMPFia8j3Uv+OYJnilSNUi0bs+42UfFGcURZEgsSGluSIWP3W
|
||||||
|
ag1ENk3Y0tLR1WMj2mjbybk9JpEAWJ0oxT+oBOV2g9Q
|
||||||
|
--- iraOjJc4e+c1tH/YoiRIoEyyLVPgRx2xWaM5BUO1Fes
|
||||||
|
ÜŔ%—UžČck !ÓX÷Ew–+¦1¬±ę¸‘;+ŔÁ
|
||||||
|
Úw& Đ&óĹşřm^uÜsś_<C59B><5F>nLâĚë<í^,›¤UÎé
|
Loading…
Add table
Add a link
Reference in a new issue