Skip to content

Instantly share code, notes, and snippets.

@nh2
Last active July 12, 2019 19:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nh2/8d9eaddef83bfcdc4a54cd638ba1d5b0 to your computer and use it in GitHub Desktop.
Save nh2/8d9eaddef83bfcdc4a54cd638ba1d5b0 to your computer and use it in GitHub Desktop.
Cachix systemd service for static-haskell-nix CI builder
{
systemd.services.static-haskell-nix-cachix-push-daemon = {
requiredBy = [ "multi-user.target" ];
after = [
"network-online.target"
];
environment.HOME = "/root";
path = [ pkgs.nix ]; # cachix shells out to nix binaries
serviceConfig = {
ExecStart = "${pkgs.cachix}/bin/cachix push static-haskell-nix --watch-store";
Restart = "always";
RestartSec = 5;
TimeoutSec = 10;
};
unitConfig = {
StartLimitIntervalSec = 0; # ensure Restart=always is always honoured
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment