mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git
synced 2024-11-23 03:51:29 +00:00
mailserver: adapt to deprecated and new types of certificateScheme
This commit is contained in:
parent
a224731dcf
commit
364a5c8076
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, ... }:
|
mailserverDate: { config, lib, ... }:
|
||||||
let
|
let
|
||||||
sp = config.selfprivacy;
|
sp = config.selfprivacy;
|
||||||
in
|
in
|
||||||
|
@ -62,7 +62,11 @@ in
|
||||||
"admin@${sp.domain}" = "${sp.username}@${sp.domain}";
|
"admin@${sp.domain}" = "${sp.username}@${sp.domain}";
|
||||||
};
|
};
|
||||||
|
|
||||||
certificateScheme = "manual";
|
certificateScheme =
|
||||||
|
if builtins.compareVersions mailserverDate "20230525011002"
|
||||||
|
>= 0
|
||||||
|
then "manual"
|
||||||
|
else 1;
|
||||||
certificateFile = "/var/lib/acme/${sp.domain}/fullchain.pem";
|
certificateFile = "/var/lib/acme/${sp.domain}/fullchain.pem";
|
||||||
keyFile = "/var/lib/acme/${sp.domain}/key.pem";
|
keyFile = "/var/lib/acme/${sp.domain}/key.pem";
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
|
|
||||||
outputs = { self, mailserver }: {
|
outputs = { self, mailserver }: {
|
||||||
nixosModules.default = args@{ config, ... }:
|
nixosModules.default = args@{ config, ... }:
|
||||||
# tricks to rename (alias) the original module
|
|
||||||
let
|
let
|
||||||
module = mailserver.nixosModules.default args;
|
module = mailserver.nixosModules.default args;
|
||||||
in
|
in
|
||||||
|
@ -14,12 +13,13 @@
|
||||||
imports = [
|
imports = [
|
||||||
module
|
module
|
||||||
{
|
{
|
||||||
|
# tricks to rename (alias) the original module
|
||||||
config.mailserver =
|
config.mailserver =
|
||||||
config.selfprivacy.modules.simple-nixos-mailserver;
|
config.selfprivacy.modules.simple-nixos-mailserver;
|
||||||
options.selfprivacy.modules.simple-nixos-mailserver =
|
options.selfprivacy.modules.simple-nixos-mailserver =
|
||||||
module.options.mailserver;
|
module.options.mailserver;
|
||||||
}
|
}
|
||||||
./config.nix
|
(import ./config.nix mailserver.lastModifiedDate)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
configPathsNeeded =
|
configPathsNeeded =
|
||||||
|
|
Loading…
Reference in a new issue