canto-daemon: Add a systemd service

This adds a systemd service for the canto-daemon.
wip/yesman
devhell 10 years ago
parent 96d6344b13
commit d6e9df1e1a
  1. 1
      nixos/modules/module-list.nix
  2. 37
      nixos/modules/services/misc/canto-daemon.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

@ -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;
};
};
}
Loading…
Cancel
Save