From d66c7a894222ce789b46de455607cd2c45c0e1f4 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sun, 5 Jan 2020 16:40:24 +0000 Subject: feat(ops/nixos/nugget): Install msmtp & lieer timers --- ops/nixos/nugget/default.nix | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'ops') diff --git a/ops/nixos/nugget/default.nix b/ops/nixos/nugget/default.nix index 0871cbca61..5b469e893f 100644 --- a/ops/nixos/nugget/default.nix +++ b/ops/nixos/nugget/default.nix @@ -8,6 +8,8 @@ config: let nixpkgs = import pkgs.third_party.nixpkgsSrc { config.allowUnfree = true; }; + + lieer = (pkgs.third_party.lieer {}); in pkgs.lib.fix(self: { hardware = { pulseaudio.enable = true; @@ -70,7 +72,7 @@ in pkgs.lib.fix(self: { environment.systemPackages = # programs from the depot (with pkgs; [ - (third_party.lieer {}) + lieer ops.kontemplate third_party.git tools.emacs @@ -93,6 +95,7 @@ in pkgs.lib.fix(self: { imagemagick jq kubectl + msmtp notmuch openssh openssl @@ -174,6 +177,26 @@ in pkgs.lib.fix(self: { # Do not restart the display manager automatically systemd.services.display-manager.restartIfChanged = lib.mkForce false; + # Configure email setup + systemd.user.services.lieer-tazjin = { + description = "Synchronise mail@tazj.in via lieer"; + script = "${lieer}/bin/gmi sync"; + + serviceConfig = { + WorkingDirectory = "%h/mail/account.tazjin"; + Type = "oneshot"; + }; + }; + + systemd.user.timers.lieer-tazjin = { + wantedBy = [ "timers.target" ]; + + timerConfig = { + OnActiveSec = "1"; + OnUnitActiveSec = "180"; + }; + }; + # ... and other nonsense. system.stateVersion = "19.09"; }) -- cgit 1.4.1