forked from mirrors/nixpkgs
canto-daemon: Add a systemd service
This adds a systemd service for the canto-daemon.
This commit is contained in:
parent
96d6344b13
commit
d6e9df1e1a
|
@ -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
|
||||
|
|
37
nixos/modules/services/misc/canto-daemon.nix
Normal file
37
nixos/modules/services/misc/canto-daemon.nix
Normal file
|
@ -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…
Reference in a new issue