22 lines
546 B
Nix
22 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;
|
||
|
};
|
||
|
};
|
||
|
}
|