treewide: format
All checks were successful
Check flake / build-amd64-linux (push) Successful in 2m53s
All checks were successful
Check flake / build-amd64-linux (push) Successful in 2m53s
This commit is contained in:
@ -19,7 +19,7 @@
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [
|
||||
22 # SSH
|
||||
22 # SSH
|
||||
];
|
||||
};
|
||||
};
|
||||
@ -71,12 +71,14 @@
|
||||
scrapeConfigs = [
|
||||
{
|
||||
job_name = "node";
|
||||
static_configs = [{
|
||||
targets = [
|
||||
"127.0.0.1:${toString config.services.prometheus.exporters.node.port}"
|
||||
"127.0.0.1:${toString config.services.prometheus.exporters.zfs.port}"
|
||||
];
|
||||
}];
|
||||
static_configs = [
|
||||
{
|
||||
targets = [
|
||||
"127.0.0.1:${toString config.services.prometheus.exporters.node.port}"
|
||||
"127.0.0.1:${toString config.services.prometheus.exporters.zfs.port}"
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
@ -90,8 +92,8 @@
|
||||
];
|
||||
wants = [ "network-online.target" ];
|
||||
serviceConfig = {
|
||||
Type="simple";
|
||||
ExecStart=pkgs.lib.mkForce ''
|
||||
Type = "simple";
|
||||
ExecStart = pkgs.lib.mkForce ''
|
||||
${pkgs.openssh}/bin/ssh \
|
||||
-NT \
|
||||
-o ExitOnForwardFailure=yes \
|
||||
@ -101,60 +103,62 @@
|
||||
-R localhost:8000:localhost:8000 \
|
||||
jellyfin@vps1.mesh.vimium.net
|
||||
'';
|
||||
Restart="always";
|
||||
RestartSec=20;
|
||||
Restart = "always";
|
||||
RestartSec = 20;
|
||||
};
|
||||
wantedBy = [ "default.target" ];
|
||||
};
|
||||
|
||||
services.nginx = let
|
||||
proxyConfig = ''
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Host $host;
|
||||
services.nginx =
|
||||
let
|
||||
proxyConfig = ''
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Host $host;
|
||||
|
||||
proxy_set_header Range $http_range;
|
||||
proxy_set_header If-Range $http_if_range;
|
||||
proxy_set_header Range $http_range;
|
||||
proxy_set_header If-Range $http_if_range;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
'';
|
||||
in {
|
||||
enable = true;
|
||||
package = pkgs.openresty;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedTlsSettings = true;
|
||||
clientMaxBodySize = "2G";
|
||||
virtualHosts = {
|
||||
"library.mesh.vimium.net" = {
|
||||
locations."/" = {
|
||||
root = "/mnt/library";
|
||||
extraConfig = ''
|
||||
autoindex on;
|
||||
'';
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
'';
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
package = pkgs.openresty;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedTlsSettings = true;
|
||||
clientMaxBodySize = "2G";
|
||||
virtualHosts = {
|
||||
"library.mesh.vimium.net" = {
|
||||
locations."/" = {
|
||||
root = "/mnt/library";
|
||||
extraConfig = ''
|
||||
autoindex on;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
"jellyfin.vimium.com" = {
|
||||
default = true;
|
||||
listen = [
|
||||
{
|
||||
addr = "127.0.0.1";
|
||||
port = 8000;
|
||||
}
|
||||
];
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:8096";
|
||||
extraConfig = proxyConfig;
|
||||
};
|
||||
locations."/metrics" = {
|
||||
return = "404";
|
||||
"jellyfin.vimium.com" = {
|
||||
default = true;
|
||||
listen = [
|
||||
{
|
||||
addr = "127.0.0.1";
|
||||
port = 8000;
|
||||
}
|
||||
];
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:8096";
|
||||
extraConfig = proxyConfig;
|
||||
};
|
||||
locations."/metrics" = {
|
||||
return = "404";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
@ -162,7 +166,10 @@
|
||||
vaapiVdpau
|
||||
];
|
||||
};
|
||||
users.users.jellyfin.extraGroups = [ "video" "render" ];
|
||||
users.users.jellyfin.extraGroups = [
|
||||
"video"
|
||||
"render"
|
||||
];
|
||||
services.jellyfin = {
|
||||
enable = true;
|
||||
package = pkgs.unstable.jellyfin;
|
||||
@ -192,4 +199,3 @@
|
||||
|
||||
system.stateVersion = "22.11";
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user