summaryrefslogtreecommitdiffstats
path: root/krebs
diff options
context:
space:
mode:
Diffstat (limited to 'krebs')
-rw-r--r--krebs/3modules/exim.nix2
-rw-r--r--krebs/5pkgs/builders.nix8
2 files changed, 9 insertions, 1 deletions
diff --git a/krebs/3modules/exim.nix b/krebs/3modules/exim.nix
index 16a2a37b6..7b18c72c1 100644
--- a/krebs/3modules/exim.nix
+++ b/krebs/3modules/exim.nix
@@ -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
diff --git a/krebs/5pkgs/builders.nix b/krebs/5pkgs/builders.nix
index 146e6f9e1..70d65cfc3 100644
--- a/krebs/5pkgs/builders.nix
+++ b/krebs/5pkgs/builders.nix
@@ -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
'';