diff options
author | Slawomir Gonet <slawek@otwiera.cz> | 2016-03-24 10:52:13 +0100 |
---|---|---|
committer | Slawomir Gonet <slawek@otwiera.cz> | 2016-03-24 20:57:33 +0100 |
commit | 3ff417cbb71ce875367d9a5b8341a7ce16a41664 (patch) | |
tree | 773d06122d37d585ffef8b354b49a31a0af535f0 /nixos/modules/services/backup/znapzend.nix | |
parent | cb81a3fd2a75d203cdab674b6dacf27f480dc7b1 (diff) | |
download | nixpkgs-3ff417cbb71ce875367d9a5b8341a7ce16a41664.tar nixpkgs-3ff417cbb71ce875367d9a5b8341a7ce16a41664.tar.gz nixpkgs-3ff417cbb71ce875367d9a5b8341a7ce16a41664.tar.bz2 nixpkgs-3ff417cbb71ce875367d9a5b8341a7ce16a41664.tar.lz nixpkgs-3ff417cbb71ce875367d9a5b8341a7ce16a41664.tar.xz nixpkgs-3ff417cbb71ce875367d9a5b8341a7ce16a41664.tar.zst nixpkgs-3ff417cbb71ce875367d9a5b8341a7ce16a41664.zip |
znapzend service: init at 0.15.3
Diffstat (limited to 'nixos/modules/services/backup/znapzend.nix')
-rw-r--r-- | nixos/modules/services/backup/znapzend.nix | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/nixos/modules/services/backup/znapzend.nix b/nixos/modules/services/backup/znapzend.nix new file mode 100644 index 00000000000..648089f90b7 --- /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 + ''; + }; + }; + + }; +} |