Set up formatting

This commit is contained in:
Natsu Kagami 2022-05-31 12:45:33 -04:00 committed by Natsu Kagami
parent 2f78eed4cc
commit 69ce8f32ef
12 changed files with 132 additions and 107 deletions

View file

@ -341,8 +341,8 @@ in
ExecStart = "${cfg.package}/bin/maddy ${if cfg.debug then "-debug " else ""}-config ${configFile}";
};
reload = ''
/bin/kill -USR1 $MAINPID
/bin/kill -USR2 $MAINPID
/bin/kill -USR1 $MAINPID
/bin/kill -USR2 $MAINPID
'';
};
};

View file

@ -1,4 +1,4 @@
{ pkgs, config, lib, ... } :
{ pkgs, config, lib, ... }:
with lib;
let
@ -7,7 +7,7 @@ let
# From a database name, create an "ensureUser"
# entry with the same name and assign all permissions
# to that database.
userFromDatabase = databaseName : {
userFromDatabase = databaseName: {
name = databaseName;
ensurePermissions = {
"DATABASE ${databaseName}" = "ALL PRIVILEGES";
@ -17,7 +17,7 @@ in
{
options.cloud.postgresql.databases = mkOption {
type = types.listOf types.str;
default = [];
default = [ ];
description = ''
The list of databases to be created.
An user with the same name

View file

@ -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";
};
};
}

View file

@ -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