2015-01-18 14:50:36 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.services.canto-daemon;
|
|
|
|
|
|
|
|
in {
|
|
|
|
|
|
|
|
##### interface
|
|
|
|
|
|
|
|
options = {
|
|
|
|
|
2015-01-29 23:53:31 +01:00
|
|
|
services.canto-daemon = {
|
2015-01-18 14:50:36 +01:00
|
|
|
enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
|
|
|
description = "Whether to enable the canto RSS daemon.";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
##### implementation
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
|
2015-01-29 23:53:31 +01:00
|
|
|
systemd.user.services.canto-daemon = {
|
2015-01-18 14:50:36 +01:00
|
|
|
description = "Canto RSS Daemon";
|
|
|
|
after = [ "network.target" ];
|
|
|
|
wantedBy = [ "default.target" ];
|
|
|
|
serviceConfig.ExecStart = "${pkgs.canto-daemon}/bin/canto-daemon";
|
|
|
|
};
|
|
|
|
};
|
2015-01-29 23:53:31 +01:00
|
|
|
|
2015-01-18 14:50:36 +01:00
|
|
|
}
|