mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 00:12:56 +00:00
d6e9df1e1a
This adds a systemd service for the canto-daemon.
38 lines
636 B
Nix
38 lines
636 B
Nix
{ 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;
|
|
};
|
|
};
|
|
}
|