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;
|
2022-07-28 23:19:15 +02:00
|
|
|
description = lib.mdDoc "Whether to enable the canto RSS daemon.";
|
2015-01-18 14:50:36 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
##### 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
|
|
|
}
|