nixpkgs/nixos/modules/services/backup/znapzend.nix

34 lines
643 B
Nix
Raw Normal View History

2016-03-24 10:52:13 +01:00
{ 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";
after = [ "zfs.target" ];
path = with pkgs; [ zfs mbuffer openssh ];
2016-03-24 10:52:13 +01:00
serviceConfig = {
ExecStart = "${pkgs.znapzend}/bin/znapzend";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
};
2016-03-24 10:52:13 +01:00
};
};
};
}