Compare commits
6 commits
d4a85d3d91
...
3197673678
Author | SHA1 | Date | |
---|---|---|---|
![]() |
3197673678 | ||
![]() |
f13edf5e0c | ||
![]() |
c314b245fa | ||
![]() |
de609b4e69 | ||
![]() |
2730b695e7 | ||
![]() |
dbd396f613 |
|
@ -1,8 +1,7 @@
|
||||||
{ config, ... }:
|
{ ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
domain = "books.sondell.org";
|
domain = "books.sondell.org";
|
||||||
# derp = "hi";
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
#
|
#
|
||||||
|
@ -13,14 +12,10 @@ in
|
||||||
|
|
||||||
|
|
||||||
services.nginx.virtualHosts.${domain} = {
|
services.nginx.virtualHosts.${domain} = {
|
||||||
enableACME = true;
|
default = true;
|
||||||
forceSSL = true;
|
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://localhost:8000/";
|
proxyPass = "http://localhost:8000/";
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
# extraConfig = ''
|
|
||||||
# access_log /var/log/nginx/access.log main if=$forgejo_access_log;
|
|
||||||
# '';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,11 +110,15 @@
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||||
# wget
|
# wget
|
||||||
|
htop
|
||||||
|
cloudflared
|
||||||
filebrowser
|
filebrowser
|
||||||
|
dufs
|
||||||
git
|
git
|
||||||
helix
|
helix
|
||||||
nil
|
nil
|
||||||
starship
|
starship
|
||||||
|
tailscale
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.fish= {
|
programs.fish= {
|
||||||
|
|
10
coturn.nix
10
coturn.nix
|
@ -63,10 +63,10 @@
|
||||||
group = "turnserver";
|
group = "turnserver";
|
||||||
};
|
};
|
||||||
# configure synapse to point users to coturn
|
# configure synapse to point users to coturn
|
||||||
services.matrix-synapse = with config.services.coturn; {
|
# services.matrix-synapse = with config.services.coturn; {
|
||||||
turn_uris = ["turn:${realm}:3478?transport=udp" "turn:${realm}:3478?transport=tcp"];
|
# turn_uris = ["turn:${realm}:3478?transport=udp" "turn:${realm}:3478?transport=tcp"];
|
||||||
turn_shared_secret = static-auth-secret;
|
# turn_shared_secret = static-auth-secret;
|
||||||
turn_user_lifetime = "1h";
|
# turn_user_lifetime = "1h";
|
||||||
};
|
# };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,16 +18,25 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.services.tailBrowser = with pkgs; {
|
||||||
|
enable = true;
|
||||||
|
description = "serve via tailscale filebrowser";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
unitConfig = {
|
||||||
|
After="filebrowser.target";
|
||||||
|
};
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = "${tailscale}/bin/tailscale serve --http 80 localhost:8080";
|
||||||
|
# User= "jellyfin";
|
||||||
|
Type= "simple";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
services.nginx.virtualHosts.${domain} = {
|
services.nginx.virtualHosts.${domain} = {
|
||||||
enableACME = true;
|
|
||||||
forceSSL = true;
|
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://localhost:8080/";
|
proxyPass = "http://localhost:8080/";
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
# extraConfig = ''
|
|
||||||
# access_log /var/log/nginx/access.log main if=$forgejo_access_log;
|
|
||||||
# '';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,14 +8,15 @@
|
||||||
specialArgs = attrs;
|
specialArgs = attrs;
|
||||||
modules = [
|
modules = [
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
|
./audiobooks.nix
|
||||||
|
./tunnel.nix
|
||||||
./forgejo.nix
|
./forgejo.nix
|
||||||
./nextcloud.nix
|
./nextcloud.nix
|
||||||
./audiobooks.nix
|
|
||||||
./jellyfin.nix
|
./jellyfin.nix
|
||||||
./filebrowser.nix
|
./filebrowser.nix
|
||||||
./matrix.nix
|
|
||||||
./tail.nix
|
./tail.nix
|
||||||
./coturn.nix
|
./matrix.nix
|
||||||
|
# ./coturn.nix # disabled becouse tls not solved
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -19,7 +19,6 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
|
||||||
appendHttpConfig = ''
|
appendHttpConfig = ''
|
||||||
map $uri $forgejo_access_log {
|
map $uri $forgejo_access_log {
|
||||||
default 1;
|
default 1;
|
||||||
|
@ -29,13 +28,8 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx.virtualHosts.${domain} = {
|
services.nginx.virtualHosts.${domain} = {
|
||||||
enableACME = true;
|
|
||||||
forceSSL = true;
|
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://localhost:3000/";
|
proxyPass = "http://localhost:3000/";
|
||||||
# extraConfig = ''
|
|
||||||
# access_log /var/log/nginx/access.log main if=$forgejo_access_log;
|
|
||||||
# '';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,14 +12,9 @@ in
|
||||||
|
|
||||||
|
|
||||||
services.nginx.virtualHosts.${domain} = {
|
services.nginx.virtualHosts.${domain} = {
|
||||||
enableACME = true;
|
|
||||||
forceSSL = true;
|
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://localhost:8096/";
|
proxyPass = "http://localhost:8096/";
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
# extraConfig = ''
|
|
||||||
# access_log /var/log/nginx/access.log main if=$forgejo_access_log;
|
|
||||||
# '';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,8 +52,8 @@ services.postgresql = {
|
||||||
|
|
||||||
services.nginx.virtualHosts = {
|
services.nginx.virtualHosts = {
|
||||||
${fqdn} = {
|
${fqdn} = {
|
||||||
enableACME = true;
|
# enableACME = true;
|
||||||
forceSSL = true;
|
# forceSSL = true;
|
||||||
locations."/".extraConfig = ''
|
locations."/".extraConfig = ''
|
||||||
return 404;
|
return 404;
|
||||||
'';
|
'';
|
||||||
|
@ -65,8 +65,8 @@ services.postgresql = {
|
||||||
};
|
};
|
||||||
|
|
||||||
${domain} = {
|
${domain} = {
|
||||||
enableACME = true;
|
# enableACME = true;
|
||||||
forceSSL = true;
|
# forceSSL = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://localhost:8008";
|
proxyPass = "http://localhost:8008";
|
||||||
};
|
};
|
||||||
|
|
|
@ -17,8 +17,8 @@ in
|
||||||
services = {
|
services = {
|
||||||
nginx.virtualHosts = {
|
nginx.virtualHosts = {
|
||||||
${domain} = {
|
${domain} = {
|
||||||
forceSSL = true;
|
# forceSSL = true;
|
||||||
enableACME = true;
|
# enableACME = true;
|
||||||
# Use DNS Challenege.
|
# Use DNS Challenege.
|
||||||
# acmeRoot = null;
|
# acmeRoot = null;
|
||||||
};
|
};
|
||||||
|
|
20
tunnel.nix
Normal file
20
tunnel.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{...}:
|
||||||
|
{
|
||||||
|
services.nginx = {
|
||||||
|
enable = true;
|
||||||
|
clientMaxBodySize = "10g";
|
||||||
|
defaultHTTPListenPort = 1234;
|
||||||
|
};
|
||||||
|
services.cloudflared = {
|
||||||
|
enable = true;
|
||||||
|
tunnels = {
|
||||||
|
"tulpan" = {
|
||||||
|
credentialsFile = "/etc/nixos/.secrets/tulpan-tunnel.json";
|
||||||
|
default = "http_status:404";
|
||||||
|
ingress = {
|
||||||
|
"*.sondell.org" = "http://localhost:1234";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue