config/hosts/TITAN/extras/cachix-upload-daemon.nix
2022-02-05 20:47:50 +01:00

21 lines
546 B
Nix

{ config, pkgs, ... }:
{
age.secrets.cachix-upload-key = {
file = ../../../secrets/cachix-upload-key.age;
mode = "0400";
};
systemd.services.cachix-upload = {
description = "Cachix Uploader";
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" ];
path = [ config.nix.package ];
serviceConfig = {
ExecStart = "${pkgs.cachix}/bin/cachix watch-store max";
Restart = "always";
DynamicUser = true;
EnvironmentFile = config.age.secrets.cachix-upload-key.path;
};
};
}