blob: 6da372471d0f8a8710c6826d52ecf81db5bbfc4c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
{ pkgs, ... }:
{
imports = [ ../git/nixpkgs ../mail ];
users.users.pushmail = { isSystemUser = true; group = "pushmail"; };
users.groups.pushmail = {};
# This service can't be DynamicUser because DynamicUser implies
# NoNewPrivileges, and sendmail is setuid.
systemd.services.pushmail = {
path = with pkgs; [ system-sendmail ];
serviceConfig.ExecStart = "${pkgs.pushmail}/bin/pushmail --from 'Nixpkgs Direct Pushes <pushmail@atuin.qyliss.net>' /var/lib/git/nixpkgs.git NixOS/nixpkgs 'Alyssa Ross <hi@alyssa.is>'";
serviceConfig.StandardInput = "file:/etc/pushmail/token";
serviceConfig.User = "pushmail";
serviceConfig.Group = "pushmail";
serviceConfig.UMask = "0002";
serviceConfig.SupplementaryGroups = "nixpkgs";
};
systemd.timers.pushmail = {
wantedBy = [ "timers.target" ];
timerConfig.OnActiveSec = 0;
timerConfig.OnUnitActiveSec = 300;
};
}
|