Last active
July 12, 2019 19:16
-
-
Save nh2/8d9eaddef83bfcdc4a54cd638ba1d5b0 to your computer and use it in GitHub Desktop.
Cachix systemd service for static-haskell-nix CI builder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
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