This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

exim-smarthost: nix fmt

+79 -24
+79 -24
2configs/exim-smarthost.nix
··· 1 - { self, config, lib, pkgs, ... }: let 1 + { 2 + self, 3 + config, 4 + lib, 5 + pkgs, 6 + ... 7 + }: 8 + let 2 9 3 10 to = lib.concatStringsSep "," [ 4 11 "lass@green.r" 5 12 ]; 6 13 7 - mails = import "${config.krebs.secret.directory}/mails.nix"; # todo make this pure somehow 14 + mails = [ 15 + ]; 8 16 9 - in { 17 + in 18 + { 10 19 imports = [ 11 20 self.inputs.stockholm.nixosModules.exim-smarthost 12 21 ]; 13 - environment.systemPackages = [ pkgs.review-mail-queue ]; 14 22 15 - clanCore.secrets."lassul.us-dkim" = { 16 - secrets."lassul.us.dkim.priv" = { }; 17 - facts."lassul.us.dkim.pub" = { }; 18 - generator.path = with pkgs; [ coreutils openssl ]; 23 + clanCore.facts.services."lassul.us-dkim" = { 24 + secret."lassul.us.dkim.priv" = { }; 25 + public."lassul.us.dkim.pub" = { }; 26 + generator.path = with pkgs; [ 27 + coreutils 28 + openssl 29 + ]; 19 30 generator.script = '' 20 31 openssl genrsa -out "$secrets"/lassul.us.dkim.priv 2048 21 32 openssl rsa -in "$secrets"/lassul.us.dkim.priv -pubout -outform der 2>/dev/null | openssl base64 -A > "$facts"/lassul.us.dkim.pub ··· 42 53 config.krebs.hosts.mors 43 54 config.krebs.hosts.xerxes 44 55 ]; 45 - internet-aliases = map (from: { inherit from to; }) mails ++ [ 46 - ]; 56 + internet-aliases = 57 + map (from: { inherit from to; }) mails 58 + ++ [ 59 + ]; 47 60 system-aliases = [ 48 - { from = "mailer-daemon"; to = "postmaster"; } 49 - { from = "postmaster"; to = "root"; } 50 - { from = "nobody"; to = "root"; } 51 - { from = "hostmaster"; to = "root"; } 52 - { from = "usenet"; to = "root"; } 53 - { from = "news"; to = "root"; } 54 - { from = "webmaster"; to = "root"; } 55 - { from = "www"; to = "root"; } 56 - { from = "ftp"; to = "root"; } 57 - { from = "abuse"; to = "root"; } 58 - { from = "noc"; to = "root"; } 59 - { from = "security"; to = "root"; } 60 - { from = "root"; to = "lass"; } 61 + { 62 + from = "mailer-daemon"; 63 + to = "postmaster"; 64 + } 65 + { 66 + from = "postmaster"; 67 + to = "root"; 68 + } 69 + { 70 + from = "nobody"; 71 + to = "root"; 72 + } 73 + { 74 + from = "hostmaster"; 75 + to = "root"; 76 + } 77 + { 78 + from = "usenet"; 79 + to = "root"; 80 + } 81 + { 82 + from = "news"; 83 + to = "root"; 84 + } 85 + { 86 + from = "webmaster"; 87 + to = "root"; 88 + } 89 + { 90 + from = "www"; 91 + to = "root"; 92 + } 93 + { 94 + from = "ftp"; 95 + to = "root"; 96 + } 97 + { 98 + from = "abuse"; 99 + to = "root"; 100 + } 101 + { 102 + from = "noc"; 103 + to = "root"; 104 + } 105 + { 106 + from = "security"; 107 + to = "root"; 108 + } 109 + { 110 + from = "root"; 111 + to = "lass"; 112 + } 61 113 ]; 62 114 }; 63 115 krebs.iptables.tables.filter.INPUT.rules = [ 64 - { predicate = "-p tcp --dport smtp"; target = "ACCEPT"; } 116 + { 117 + predicate = "-p tcp --dport smtp"; 118 + target = "ACCEPT"; 119 + } 65 120 ]; 66 121 67 122 security.acme.certs."mail.lassul.us" = {