summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2017-12-25 23:01:27 +0100
committerlassulus <lassulus@lassul.us>2017-12-25 23:01:27 +0100
commit3a41a73f1fcc32736ace08783d9bfee8a77f3f80 (patch)
tree2b9f02ddb439ae403e4238a9e4f47aa5fda65878
parentb73b1c45e57e3bab0300f5ecbed261c6d45a5d53 (diff)
parent28085c8e6d37a0dd31d7627fa01d072723c4f46c (diff)
Merge remote-tracking branch 'ni/master' into staging/test
-rw-r--r--krebs/5pkgs/simple/eximlog.nix28
-rw-r--r--tv/1systems/querel/config.nix3
-rw-r--r--tv/2configs/exim-retiolum.nix3
-rw-r--r--tv/2configs/exim-smarthost.nix3
4 files changed, 37 insertions, 0 deletions
diff --git a/krebs/5pkgs/simple/eximlog.nix b/krebs/5pkgs/simple/eximlog.nix
new file mode 100644
index 000000000..2d64e13e9
--- /dev/null
+++ b/krebs/5pkgs/simple/eximlog.nix
@@ -0,0 +1,28 @@
+{ jq, systemd, writeDashBin }:
+
+let
+ lib = import <stockholm/lib>;
+ user = "exim"; # TODO make this configurable
+in
+
+# TODO execute eximlog only if journalctl doesn't fail
+# bash's set -o pipefail isn't enough
+
+writeDashBin "eximlog" ''
+ ${systemd}/bin/journalctl \
+ -u ${lib.shell.escape user} \
+ -o short-unix \
+ "$@" \
+ |
+ ${jq}/bin/jq -Rr '
+ # Only select lines that start with a timestamp
+ select(test("^[0-9]")) |
+
+ split(" ") |
+ (.[0] | tonumber) as $time |
+ (.[3:] | join(" ")) as $message |
+
+ "\($time | strftime("%Y-%m-%d %H:%M:%S %z")) \($message)"
+
+ '
+''
diff --git a/tv/1systems/querel/config.nix b/tv/1systems/querel/config.nix
index 05b4d9133..07ec8e403 100644
--- a/tv/1systems/querel/config.nix
+++ b/tv/1systems/querel/config.nix
@@ -29,6 +29,7 @@ with import <stockholm/lib>;
};
environment.systemPackages = with pkgs; [
+ chromium
firefoxWrapper
gimp
kate
@@ -65,6 +66,8 @@ with import <stockholm/lib>;
networking.networkmanager.enable = true;
+ nixpkgs.config.chromium.enablePepperFlash = true;
+
programs.ssh.startAgent = false;
services.printing = {
diff --git a/tv/2configs/exim-retiolum.nix b/tv/2configs/exim-retiolum.nix
index bf13a388a..8b34b16cf 100644
--- a/tv/2configs/exim-retiolum.nix
+++ b/tv/2configs/exim-retiolum.nix
@@ -3,6 +3,9 @@
with import <stockholm/lib>;
{
+ environment.systemPackages = [
+ pkgs.eximlog
+ ];
krebs.exim-retiolum.enable = true;
tv.iptables.input-retiolum-accept-tcp = singleton "smtp";
}
diff --git a/tv/2configs/exim-smarthost.nix b/tv/2configs/exim-smarthost.nix
index 079013c79..68fbcd151 100644
--- a/tv/2configs/exim-smarthost.nix
+++ b/tv/2configs/exim-smarthost.nix
@@ -3,6 +3,9 @@
with import <stockholm/lib>;
{
+ environment.systemPackages = [
+ pkgs.eximlog
+ ];
krebs.exim-smarthost = {
enable = true;
dkim = [