Format project using nixfmt rfc candidate.
This commit is contained in:
parent
1f63817684
commit
a9f7fe416f
91 changed files with 1347 additions and 1000 deletions
|
@ -15,28 +15,35 @@
|
|||
}:
|
||||
with lib;
|
||||
with builtins;
|
||||
mkIf (elem "nginx" config.machine.services) {
|
||||
services.nginx = let
|
||||
vHostConfigs = listToAttrs (map
|
||||
(name: {
|
||||
name = replaceStrings [".nix"] [""] name;
|
||||
value = import (./. + (toPath "/nginx_vHosts/${name}")) {inherit options config lib pkgs;};
|
||||
})
|
||||
(attrNames (readDir ./nginx_vHosts)));
|
||||
mkIf (elem "nginx" config.machine.services) {
|
||||
services.nginx =
|
||||
let
|
||||
vHostConfigs = listToAttrs (
|
||||
map (name: {
|
||||
name = replaceStrings [ ".nix" ] [ "" ] name;
|
||||
value = import (./. + (toPath "/nginx_vHosts/${name}")) {
|
||||
inherit
|
||||
options
|
||||
config
|
||||
lib
|
||||
pkgs
|
||||
;
|
||||
};
|
||||
}) (attrNames (readDir ./nginx_vHosts))
|
||||
);
|
||||
|
||||
mkVHost = vHost: {
|
||||
name = vHost.domain;
|
||||
value =
|
||||
{
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
acmeRoot = "/var/lib/acme/acme-challenge";
|
||||
}
|
||||
// vHostConfigs."${vHost.service}";
|
||||
value = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
acmeRoot = "/var/lib/acme/acme-challenge";
|
||||
} // vHostConfigs."${vHost.service}";
|
||||
};
|
||||
|
||||
vHosts = listToAttrs (map mkVHost config.machine.vHosts);
|
||||
in {
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
|
@ -56,4 +63,4 @@ with builtins;
|
|||
'';
|
||||
virtualHosts = vHosts;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue