From 3ff417cbb71ce875367d9a5b8341a7ce16a41664 Mon Sep 17 00:00:00 2001 From: Slawomir Gonet Date: Thu, 24 Mar 2016 10:52:13 +0100 Subject: znapzend service: init at 0.15.3 --- nixos/modules/services/backup/znapzend.nix | 36 ++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 nixos/modules/services/backup/znapzend.nix (limited to 'nixos/modules/services/backup') diff --git a/nixos/modules/services/backup/znapzend.nix b/nixos/modules/services/backup/znapzend.nix new file mode 100644 index 000000000000..648089f90b7b --- /dev/null +++ b/nixos/modules/services/backup/znapzend.nix @@ -0,0 +1,36 @@ +{ 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; [ znapzend zfs mbuffer openssh ]; + + script = '' + znapzend + ''; + + reload = '' + /bin/kill -HUP $MAINPID + ''; + }; + }; + + }; +} -- cgit 1.4.1