summaryrefslogtreecommitdiffstats
path: root/krebs/2configs
diff options
context:
space:
mode:
Diffstat (limited to 'krebs/2configs')
-rw-r--r--krebs/2configs/shack/muell_mail.nix4
-rw-r--r--krebs/2configs/shack/s3-power.nix33
2 files changed, 35 insertions, 2 deletions
diff --git a/krebs/2configs/shack/muell_mail.nix b/krebs/2configs/shack/muell_mail.nix
index 732269c88..39d49918d 100644
--- a/krebs/2configs/shack/muell_mail.nix
+++ b/krebs/2configs/shack/muell_mail.nix
@@ -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>;
diff --git a/krebs/2configs/shack/s3-power.nix b/krebs/2configs/shack/s3-power.nix
new file mode 100644
index 000000000..f0648d00b
--- /dev/null
+++ b/krebs/2configs/shack/s3-power.nix
@@ -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;
+ };
+ };
+}