Set up formatting
This commit is contained in:
parent
2f78eed4cc
commit
69ce8f32ef
12 changed files with 132 additions and 107 deletions
|
@ -26,21 +26,21 @@ in
|
|||
|
||||
description = "Dump certificates generated by traefik to a destination folder";
|
||||
serviceConfig =
|
||||
let
|
||||
user = config.systemd.services.traefik.serviceConfig.User;
|
||||
group = config.systemd.services.traefik.serviceConfig.Group;
|
||||
certsPath = config.cloud.traefik.certsPath;
|
||||
in
|
||||
{
|
||||
User = user;
|
||||
Group = group;
|
||||
ExecStart = "${cfg.package}/bin/traefik-certs-dumper file --watch --domain-subdir=true --version v2 --source ${certsPath} --dest ${cfg.destination} --post-hook 'chmod -R +r ${cfg.destination}'";
|
||||
LimitNOFILE = "1048576";
|
||||
PrivateTmp = "true";
|
||||
PrivateDevices = "true";
|
||||
ProtectHome = "true";
|
||||
ProtectSystem = "strict";
|
||||
StateDirectory = "traefik-certs";
|
||||
};
|
||||
let
|
||||
user = config.systemd.services.traefik.serviceConfig.User;
|
||||
group = config.systemd.services.traefik.serviceConfig.Group;
|
||||
certsPath = config.cloud.traefik.certsPath;
|
||||
in
|
||||
{
|
||||
User = user;
|
||||
Group = group;
|
||||
ExecStart = "${cfg.package}/bin/traefik-certs-dumper file --watch --domain-subdir=true --version v2 --source ${certsPath} --dest ${cfg.destination} --post-hook 'chmod -R +r ${cfg.destination}'";
|
||||
LimitNOFILE = "1048576";
|
||||
PrivateTmp = "true";
|
||||
PrivateDevices = "true";
|
||||
ProtectHome = "true";
|
||||
ProtectSystem = "strict";
|
||||
StateDirectory = "traefik-certs";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,22 +1,24 @@
|
|||
{ pkgs, config, lib, ... } :
|
||||
{ pkgs, config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
# Copied from traefik.nix
|
||||
jsonValue = with types;
|
||||
let
|
||||
valueType = nullOr (oneOf [
|
||||
bool
|
||||
int
|
||||
float
|
||||
str
|
||||
(lazyAttrsOf valueType)
|
||||
(listOf valueType)
|
||||
]) // {
|
||||
valueType = nullOr
|
||||
(oneOf [
|
||||
bool
|
||||
int
|
||||
float
|
||||
str
|
||||
(lazyAttrsOf valueType)
|
||||
(listOf valueType)
|
||||
]) // {
|
||||
description = "JSON value";
|
||||
emptyValue.value = { };
|
||||
};
|
||||
in valueType;
|
||||
in
|
||||
valueType;
|
||||
|
||||
cfg = config.cloud.traefik;
|
||||
in
|
||||
|
@ -30,7 +32,7 @@ in
|
|||
|
||||
config = mkOption {
|
||||
type = jsonValue;
|
||||
default = {};
|
||||
default = { };
|
||||
description = "The dynamic configuration to be passed to traefik";
|
||||
};
|
||||
|
||||
|
@ -40,7 +42,7 @@ in
|
|||
description = "The location to read and write the certificates file onto";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
config.services.traefik = {
|
||||
enable = true;
|
||||
|
||||
|
@ -62,7 +64,7 @@ in
|
|||
|
||||
# Logging
|
||||
# -------
|
||||
accessLog = {};
|
||||
accessLog = { };
|
||||
log.level = "info";
|
||||
|
||||
# ACME Automatic SSL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue