2024-12-10 20:27:17 +01:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2015-01-18 13:50:36 +00:00
|
|
|
let
|
|
|
|
|
2024-12-10 20:27:17 +01:00
|
|
|
cfg = config.services.canto-daemon;
|
2015-01-18 13:50:36 +00:00
|
|
|
|
2024-12-10 20:27:17 +01:00
|
|
|
in
|
|
|
|
{
|
2015-01-18 13:50:36 +00:00
|
|
|
|
2024-12-10 20:27:17 +01:00
|
|
|
##### interface
|
2015-01-18 13:50:36 +00:00
|
|
|
|
|
|
|
options = {
|
|
|
|
|
2015-01-29 22:53:31 +00:00
|
|
|
services.canto-daemon = {
|
2024-08-24 22:05:39 +02:00
|
|
|
enable = lib.mkOption {
|
|
|
|
type = lib.types.bool;
|
2015-01-18 13:50:36 +00:00
|
|
|
default = false;
|
2024-04-13 14:54:15 +02:00
|
|
|
description = "Whether to enable the canto RSS daemon.";
|
2015-01-18 13:50:36 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2024-12-10 20:27:17 +01:00
|
|
|
##### implementation
|
2015-01-18 13:50:36 +00:00
|
|
|
|
2024-08-24 22:05:39 +02:00
|
|
|
config = lib.mkIf cfg.enable {
|
2015-01-18 13:50:36 +00:00
|
|
|
|
2015-01-29 22:53:31 +00:00
|
|
|
systemd.user.services.canto-daemon = {
|
2015-01-18 13:50:36 +00:00
|
|
|
description = "Canto RSS Daemon";
|
|
|
|
after = [ "network.target" ];
|
|
|
|
wantedBy = [ "default.target" ];
|
|
|
|
serviceConfig.ExecStart = "${pkgs.canto-daemon}/bin/canto-daemon";
|
|
|
|
};
|
|
|
|
};
|
2015-01-29 22:53:31 +00:00
|
|
|
|
2015-01-18 13:50:36 +00:00
|
|
|
}
|