blob: a980ac1b3b03e1768b7e63285b709b9dfc3f1028 (
plain) (
tree)
|
|
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.znapzend;
in
{
options = {
services.znapzend = {
enable = mkEnableOption "ZnapZend daemon";
};
};
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.znapzend ];
systemd.services = {
"znapzend" = {
description = "ZnapZend - ZFS Backup System";
wantedBy = [ "zfs.target" ];
after = [ "zfs.target" ];
path = with pkgs; [ zfs mbuffer openssh ];
serviceConfig = {
ExecStart = "${pkgs.znapzend}/bin/znapzend";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
};
};
};
};
}
|