applied nixfmt (new version)
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
setup = import ./servers/base.nix { inherit lib config; };
|
||||
proxy = locations: {
|
||||
@@ -7,12 +12,11 @@ let
|
||||
enableACME = true;
|
||||
http2 = true;
|
||||
};
|
||||
proxyReverse = port:
|
||||
proxy {
|
||||
"/".proxyPass = "http://${config.my.localhost}:${toString port}/";
|
||||
};
|
||||
proxyReverseArr = port:
|
||||
proxyReverse port // {
|
||||
proxyReverse = port: proxy { "/".proxyPass = "http://${config.my.localhost}:${toString port}/"; };
|
||||
proxyReverseArr =
|
||||
port:
|
||||
proxyReverse port
|
||||
// {
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
@@ -35,17 +39,46 @@ let
|
||||
config.my.servers.metube.enable
|
||||
config.my.servers.go-vod.enable
|
||||
];
|
||||
in {
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./servers/adguardhome.nix
|
||||
./servers/paperless.nix
|
||||
./servers/postgres.nix
|
||||
(import ./servers/audiobookshelf.nix { inherit lib config proxy setup; })
|
||||
(import ./servers/audiobookshelf.nix {
|
||||
inherit
|
||||
lib
|
||||
config
|
||||
proxy
|
||||
setup
|
||||
;
|
||||
})
|
||||
(import ./servers/bazarr.nix { inherit lib config proxyReverse; })
|
||||
(import ./servers/flame.nix { inherit lib config proxyReverse; })
|
||||
(import ./servers/homepage.nix { inherit lib config pkgs proxyReverse; })
|
||||
(import ./servers/jellyfin.nix { inherit lib config pkgs setup; })
|
||||
(import ./servers/kavita.nix { inherit lib config pkgs proxyReverse; })
|
||||
(import ./servers/homepage.nix {
|
||||
inherit
|
||||
lib
|
||||
config
|
||||
pkgs
|
||||
proxyReverse
|
||||
;
|
||||
})
|
||||
(import ./servers/jellyfin.nix {
|
||||
inherit
|
||||
lib
|
||||
config
|
||||
pkgs
|
||||
setup
|
||||
;
|
||||
})
|
||||
(import ./servers/kavita.nix {
|
||||
inherit
|
||||
lib
|
||||
config
|
||||
pkgs
|
||||
proxyReverse
|
||||
;
|
||||
})
|
||||
(import ./servers/lidarr.nix { inherit lib config proxyReverseArr; })
|
||||
(import ./servers/maloja.nix { inherit lib config proxyReverse; })
|
||||
(import ./servers/mealie.nix { inherit lib config proxyReverse; })
|
||||
@@ -54,14 +87,49 @@ in {
|
||||
(import ./servers/multi-scrobbler.nix { inherit lib config proxyReverse; })
|
||||
(import ./servers/nextcloud.nix { inherit lib config pkgs; })
|
||||
(import ./servers/prowlarr.nix { inherit lib config proxyReverseArr; })
|
||||
(import ./servers/qbittorrent.nix { inherit lib config pkgs proxyReverse; })
|
||||
(import ./servers/sabnzbd.nix { inherit lib config pkgs proxyReverse; })
|
||||
(import ./servers/qbittorrent.nix {
|
||||
inherit
|
||||
lib
|
||||
config
|
||||
pkgs
|
||||
proxyReverse
|
||||
;
|
||||
})
|
||||
(import ./servers/sabnzbd.nix {
|
||||
inherit
|
||||
lib
|
||||
config
|
||||
pkgs
|
||||
proxyReverse
|
||||
;
|
||||
})
|
||||
(import ./servers/radarr.nix { inherit lib config proxyReverseArr; })
|
||||
(import ./servers/ryot.nix { inherit lib config proxyReverse; })
|
||||
(import ./servers/shiori.nix { inherit lib config pkgs proxyReverse; })
|
||||
(import ./servers/shiori.nix {
|
||||
inherit
|
||||
lib
|
||||
config
|
||||
pkgs
|
||||
proxyReverse
|
||||
;
|
||||
})
|
||||
(import ./servers/sonarr.nix { inherit lib config proxyReverse; })
|
||||
(import ./servers/vaultwarden.nix { inherit lib config pkgs proxyReverse; })
|
||||
(import ./servers/firefly-iii.nix { inherit lib config pkgs proxyReverse; })
|
||||
(import ./servers/vaultwarden.nix {
|
||||
inherit
|
||||
lib
|
||||
config
|
||||
pkgs
|
||||
proxyReverse
|
||||
;
|
||||
})
|
||||
(import ./servers/firefly-iii.nix {
|
||||
inherit
|
||||
lib
|
||||
config
|
||||
pkgs
|
||||
proxyReverse
|
||||
;
|
||||
})
|
||||
];
|
||||
options.my = {
|
||||
localhost = lib.mkOption {
|
||||
@@ -173,11 +241,17 @@ in {
|
||||
clientMaxBodySize = "4096m";
|
||||
sslCiphers = "AES256+EECDH:AES256+EDH:!aNULL";
|
||||
};
|
||||
networking.firewall = let ports = [ 80 443 ];
|
||||
in {
|
||||
enable = true;
|
||||
allowedTCPPorts = ports;
|
||||
allowedUDPPorts = ports;
|
||||
};
|
||||
networking.firewall =
|
||||
let
|
||||
ports = [
|
||||
80
|
||||
443
|
||||
];
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
allowedTCPPorts = ports;
|
||||
allowedUDPPorts = ports;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user