2020-04-24 23:36:52 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.services.canto-daemon;
|
|
|
|
|
|
|
|
in {
|
|
|
|
|
|
|
|
##### interface
|
|
|
|
|
|
|
|
options = {
|
|
|
|
|
|
|
|
services.canto-daemon = {
|
|
|
|
enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
2024-04-21 15:54:59 +00:00
|
|
|
description = "Whether to enable the canto RSS daemon.";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
##### implementation
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
|
|
|
|
systemd.user.services.canto-daemon = {
|
|
|
|
description = "Canto RSS Daemon";
|
|
|
|
after = [ "network.target" ];
|
|
|
|
wantedBy = [ "default.target" ];
|
|
|
|
serviceConfig.ExecStart = "${pkgs.canto-daemon}/bin/canto-daemon";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|