mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 22:36:23 +01:00
nixos/stalwart-mail: package and configure webadmin
This commit is contained in:
parent
51704cb008
commit
880bd89c4d
2 changed files with 9 additions and 1 deletions
|
@ -73,8 +73,14 @@ in {
|
|||
resolver.public-suffix = lib.mkDefault [
|
||||
"file://${pkgs.publicsuffix-list}/share/publicsuffix/public_suffix_list.dat"
|
||||
];
|
||||
config.resource = {
|
||||
config.resource = let
|
||||
hasHttpListener = builtins.any (listener: listener.protocol == "http") (lib.attrValues cfg.settings.server.listener);
|
||||
in {
|
||||
spam-filter = lib.mkDefault "file://${cfg.package}/etc/stalwart/spamfilter.toml";
|
||||
} // lib.optionalAttrs (
|
||||
(builtins.hasAttr "listener" cfg.settings.server) && hasHttpListener
|
||||
) {
|
||||
webadmin = lib.mkDefault "file://${cfg.package.webadmin}/webadmin.zip";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
nix-update-script,
|
||||
nixosTests,
|
||||
rocksdb_8_11,
|
||||
callPackage,
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -144,6 +145,7 @@ rustPlatform.buildRustPackage {
|
|||
doCheck = !(stdenv.isLinux && stdenv.isAarch64);
|
||||
|
||||
passthru = {
|
||||
webadmin = callPackage ./webadmin.nix { };
|
||||
update-script = nix-update-script { };
|
||||
tests.stalwart-mail = nixosTests.stalwart-mail;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue