Created
April 23, 2019 22:10
-
-
Save schonfinkel/d76fffebe1720e7b1089ba8cdc2f9533 to your computer and use it in GitHub Desktop.
Nixos Systemd Daemons
This file contains 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
{lib, options, pkgs, config, ...}: | |
{ | |
systemd.services.ipfs-daemon = { | |
description = "IPFS Daemon"; | |
wantedBy = [ "default.target" ]; | |
after = [ "network.target" ]; | |
serviceConfig = { | |
Type = "forking"; | |
User = "usul"; | |
ExecStart = "${pkgs.ipfs}/bin/ipfs daemon"; | |
ExecStop = "${pkgs.procps}/bin/pkill ipfs"; | |
Restart = "on-failure"; | |
}; | |
}; | |
systemd.services.ipfs-daemon.enable = true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment