Skip to content

Instantly share code, notes, and snippets.

@mtrsk
Created April 23, 2019 22:10
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 mtrsk/d76fffebe1720e7b1089ba8cdc2f9533 to your computer and use it in GitHub Desktop.
Save mtrsk/d76fffebe1720e7b1089ba8cdc2f9533 to your computer and use it in GitHub Desktop.
Nixos Systemd Daemons
{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