Site max en module
This commit is contained in:
parent
735d4e2c33
commit
c365ca44f7
@ -18,6 +18,7 @@ in
|
||||
./services/mail-server.nix
|
||||
./services/lidarr.nix
|
||||
./services/site-musique.nix
|
||||
./services/site-max.nix
|
||||
];
|
||||
|
||||
services.haproxy-acme.enable = true;
|
||||
@ -37,7 +38,6 @@ in
|
||||
organizr = { ip = "127.0.0.1"; port = organizr_port; auth = true; };
|
||||
calibre = { ip = "127.0.0.1"; port = 8080; auth = false; };
|
||||
pgmanage = { ip = "127.0.0.1"; port = pgmanage_port; auth = true; };
|
||||
max = { ip = "127.0.0.1"; port = max_port; auth = false; };
|
||||
};
|
||||
|
||||
services.mailserver.enable = true;
|
||||
@ -135,10 +135,6 @@ in
|
||||
'';
|
||||
};
|
||||
};
|
||||
"max" = {
|
||||
listen = [ { addr = "127.0.0.1"; port = max_port; } ];
|
||||
locations = { "/" = { root = pkgs.site-max; }; };
|
||||
};
|
||||
};
|
||||
|
||||
services.phpfpm.poolConfigs.mypool = ''
|
||||
@ -210,6 +206,9 @@ in
|
||||
services.site-musique.enable = true;
|
||||
services.site-musique.port = musique_port;
|
||||
|
||||
services.site-max.enable = true;
|
||||
services.site-max.port = max_port;
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
111 2049 4000 4001 4002 # NFS
|
||||
3483 9000 9090 # Slimserver
|
||||
|
35
services/site-max.nix
Normal file
35
services/site-max.nix
Normal file
@ -0,0 +1,35 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.site-max;
|
||||
in
|
||||
{
|
||||
options.services.site-max = {
|
||||
enable = mkEnableOption "Site Max Spiegel";
|
||||
|
||||
port = mkOption {
|
||||
type = types.int;
|
||||
example = 54321;
|
||||
description = "Local listening port";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
services.haproxy-acme.services = {
|
||||
max = { ip = "127.0.0.1"; port = cfg.port; auth = false; };
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts = {
|
||||
"max" = {
|
||||
listen = [ { addr = "127.0.0.1"; port = cfg.port; } ];
|
||||
locations."/" = {
|
||||
root = pkgs.site-max;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user