shack/muell_mail,s3-power: update commits

This commit is contained in:
makefu 2019-07-15 09:58:20 +02:00
parent 13773d684c
commit e767afa039
No known key found for this signature in database
GPG Key ID: 36F7711F3FC0F225
2 changed files with 35 additions and 2 deletions

View File

@ -4,8 +4,8 @@ let
pkg = pkgs.callPackage (
pkgs.fetchgit {
url = "https://git.shackspace.de/rz/muell_mail";
rev = "317370e3e98ce34da4ee615af7a80df7b519ab89";
sha256 = "sha256:02mywm37n0v4icgy474wwkavb7vad93bvkigvz1cqn7fbg4ldc8k";
rev = "861ec25ab22797d8961efb32e72d79e113aa9f0f";
sha256 = "sha256:18cw95zbr7isv4cw80cbpd84n5z208fwh5390i6j10jkn398mjq2";
}) {};
home = "/var/lib/muell_mail";
cfg = toString <secrets/shack/muell_mail.js>;

View File

@ -0,0 +1,33 @@
{ config, lib, pkgs, ... }:
let
pkg = pkgs.callPackage (
pkgs.fetchgit {
url = "https://git.shackspace.de/rz/s3-power";
rev = "1a59f8e34924c8809d06895bd96c7f98d037026e";
sha256 = "sha256:191625mg7n41852h1c0ay3492f29n7kxkab0kwczyp07xh5y25nn";
}) {};
home = "/var/lib/s3-power";
cfg = toString <secrets/shack/s3-power.json>;
in {
users.users.s3_power = {
inherit home;
createHome = true;
};
systemd.services.s3-power = {
description = "s3-power";
wantedBy = [ "multi-user.target" ];
environment.CONFIG = "${home}/s3-power.json";
serviceConfig = {
User = "s3_power";
ExecStartPre = pkgs.writeDash "s3-power-pre" ''
install -D -os3_power -m700 ${cfg} ${home}/s3-power.json
'';
WorkingDirectory = home;
PermissionsStartOnly = true;
ExecStart = "${pkg}/bin/s3-power";
Restart = "always";
PrivateTmp = true;
};
};
}