mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-11-09 18:47:02 +00:00
update phpipam settings
This commit is contained in:
parent
300647d18c
commit
1b63b28b79
1 changed files with 23 additions and 33 deletions
|
@ -33,24 +33,14 @@ in
|
||||||
|
|
||||||
enable = lib.mkEnableOption "Enable phpipam";
|
enable = lib.mkEnableOption "Enable phpipam";
|
||||||
|
|
||||||
domainName = lib.mkOption {
|
hostname = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "localhost";
|
default = "localhost";
|
||||||
};
|
};
|
||||||
|
|
||||||
useTLS = lib.mkOption {
|
virtualHost = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.attrs;
|
||||||
default = false;
|
default = { };
|
||||||
};
|
|
||||||
|
|
||||||
certificatePath = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "/etc/nixos/phpipam.crt";
|
|
||||||
};
|
|
||||||
|
|
||||||
certificateKeyPath = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "/etc/nixos/phpipam.key";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -92,10 +82,9 @@ in
|
||||||
|
|
||||||
nginx = {
|
nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
virtualHosts."${cfg.domainName}" = {
|
virtualHosts."${cfg.hostname}" = lib.mkMerge [
|
||||||
addSSL = cfg.useTLS;
|
cfg.virtualHost
|
||||||
sslCertificate = cfg.certificatePath;
|
{
|
||||||
sslCertificateKey = cfg.certificateKeyPath;
|
|
||||||
extraConfig = "access_log syslog:server=unix:/dev/log;";
|
extraConfig = "access_log syslog:server=unix:/dev/log;";
|
||||||
root = phpipamHtdocs;
|
root = phpipamHtdocs;
|
||||||
locations."/".extraConfig = ''
|
locations."/".extraConfig = ''
|
||||||
|
@ -110,7 +99,8 @@ in
|
||||||
try_files $uri $uri/ index.php = 404;
|
try_files $uri $uri/ index.php = 404;
|
||||||
include ${pkgs.nginx}/conf/fastcgi.conf;
|
include ${pkgs.nginx}/conf/fastcgi.conf;
|
||||||
'';
|
'';
|
||||||
};
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
mysql = {
|
mysql = {
|
||||||
|
|
Loading…
Reference in a new issue