krebs.exim: validate config file syntax
This commit is contained in:
parent
ace70674aa
commit
97c2e4bbd9
krebs
|
@ -37,7 +37,7 @@ in {
|
|||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment = {
|
||||
etc."exim.conf".text = ''
|
||||
etc."exim.conf".source = pkgs.writeEximConfig "exim.conf" ''
|
||||
exim_user = ${cfg.user.name}
|
||||
exim_group = ${cfg.group.name}
|
||||
exim_path = /var/setuid-wrappers/exim
|
||||
|
|
|
@ -56,6 +56,14 @@ rec {
|
|||
'';
|
||||
};
|
||||
|
||||
writeEximConfig = name: text: pkgs.runCommand name {
|
||||
inherit text;
|
||||
passAsFile = [ "text" ];
|
||||
} ''
|
||||
${pkgs.exim}/bin/exim -C "$textPath" -bV >/dev/null
|
||||
mv "$textPath" $out
|
||||
'';
|
||||
|
||||
writeNixFromCabal = name: path: pkgs.runCommand name {} ''
|
||||
${pkgs.cabal2nix}/bin/cabal2nix ${path} > $out
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue