From d6e9df1e1ade98ed3a404c4b37421449b6b86e2f Mon Sep 17 00:00:00 2001 From: devhell <^@regexmail.net> Date: Sun, 18 Jan 2015 13:50:36 +0000 Subject: [PATCH] canto-daemon: Add a systemd service This adds a systemd service for the canto-daemon. --- nixos/modules/module-list.nix | 1 + nixos/modules/services/misc/canto-daemon.nix | 37 ++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 nixos/modules/services/misc/canto-daemon.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index b949fef6bab..4c0d45bc44e 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -172,6 +172,7 @@ ./services/mail/spamassassin.nix ./services/misc/apache-kafka.nix #./services/misc/autofs.nix + ./services/misc/canto-daemon.nix ./services/misc/cpuminer-cryptonight.nix ./services/misc/cgminer.nix ./services/misc/dictd.nix diff --git a/nixos/modules/services/misc/canto-daemon.nix b/nixos/modules/services/misc/canto-daemon.nix new file mode 100644 index 00000000000..ac292cd2826 --- /dev/null +++ b/nixos/modules/services/misc/canto-daemon.nix @@ -0,0 +1,37 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + +cfg = config.services.canto-daemon; + +in { + +##### interface + + options = { + + services.canto-daemon { + enable = mkOption { + type = types.bool; + default = false; + description = "Whether to enable the canto RSS daemon."; + }; + }; + + }; + +##### implementation + + config = mkIf cfg.enable { + + systemd.user.services.canto-next = { + description = "Canto RSS Daemon"; + after = [ "network.target" ]; + wantedBy = [ "default.target" ]; + serviceConfig.ExecStart = "${pkgs.canto-daemon}/bin/canto-daemon"; + TimeoutStopSec = 10; + }; + }; +}