Compare commits
No commits in common. "5885a850bf5b4aaf82869d9865ff82aa564a3a4f" and "00c926e45bd78771f5472eeb36cd4855be15ca6d" have entirely different histories.
5885a850bf
...
00c926e45b
5 changed files with 5 additions and 75 deletions
|
@ -84,16 +84,4 @@
|
||||||
|
|
||||||
systemd.services."${backend}-mc-${name}".serviceConfig.TimeoutSec = "300";
|
systemd.services."${backend}-mc-${name}".serviceConfig.TimeoutSec = "300";
|
||||||
};
|
};
|
||||||
|
|
||||||
mkFrpPassthrough = name: port: {
|
|
||||||
services.frp.settings.proxies = [
|
|
||||||
{
|
|
||||||
inherit name;
|
|
||||||
type = "tcp";
|
|
||||||
localIp = "localhost";
|
|
||||||
localPort = port;
|
|
||||||
remotePort = port;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
{ config, _utils, ... }:
|
{ config, ... }:
|
||||||
let
|
|
||||||
frp = _utils.mkFrpPassthrough "immich" config.services.immich.port;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
imports = [ frp ];
|
cfTunnels."im.uku.moe" = "http://localhost:${builtins.toString config.services.immich.port}";
|
||||||
|
|
||||||
services.immich = {
|
services.immich = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
{ config, ... }:
|
|
||||||
{
|
|
||||||
security.acme = {
|
|
||||||
acceptTerms = true;
|
|
||||||
defaults = {
|
|
||||||
email = "acme@uku.moe";
|
|
||||||
webroot = "/var/lib/acme/acme-challenge";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.nginx.virtualHosts = {
|
|
||||||
"acme.uku3lig.net" = {
|
|
||||||
serverAliases = [
|
|
||||||
"*.uku3lig.net"
|
|
||||||
"*.uku.moe"
|
|
||||||
];
|
|
||||||
|
|
||||||
locations."/.well-known/acme-challenge".root = config.security.acme.defaults.webroot;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# /var/lib/acme/acme-challenge must be writable by the ACME user and readable by the Nginx user.
|
|
||||||
# The easiest way to achieve this is to add the Nginx user to the ACME group.
|
|
||||||
users.users.nginx.extraGroups = [ "acme" ];
|
|
||||||
}
|
|
|
@ -1,10 +1,8 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./certificates.nix
|
|
||||||
./frp.nix
|
./frp.nix
|
||||||
./hetzner.nix
|
./hetzner.nix
|
||||||
./nginx.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
@ -12,16 +10,8 @@
|
||||||
traceroute
|
traceroute
|
||||||
];
|
];
|
||||||
|
|
||||||
services = {
|
services.openssh = {
|
||||||
nginx.enable = true;
|
ports = [ 4269 ];
|
||||||
openssh = {
|
openFirewall = true;
|
||||||
ports = [ 4269 ];
|
|
||||||
openFirewall = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [
|
|
||||||
80
|
|
||||||
443
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
{
|
|
||||||
services.nginx.virtualHosts = {
|
|
||||||
# immich
|
|
||||||
"im.uku.moe" = {
|
|
||||||
forceSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://localhost:2283";
|
|
||||||
proxyWebsockets = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
extraConfig = ''
|
|
||||||
client_max_body_size 5000M;
|
|
||||||
proxy_read_timeout 600s;
|
|
||||||
proxy_send_timeout 600s;
|
|
||||||
send_timeout 600s;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue