mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-24 20:02:58 +03:00
znapzend service: init at 0.15.3
This commit is contained in:
parent
cb81a3fd2a
commit
3ff417cbb7
@ -114,6 +114,7 @@
|
||||
./services/backup/rsnapshot.nix
|
||||
./services/backup/sitecopy-backup.nix
|
||||
./services/backup/tarsnap.nix
|
||||
./services/backup/znapzend.nix
|
||||
./services/cluster/fleet.nix
|
||||
./services/cluster/kubernetes.nix
|
||||
./services/cluster/panamax.nix
|
||||
|
36
nixos/modules/services/backup/znapzend.nix
Normal file
36
nixos/modules/services/backup/znapzend.nix
Normal file
@ -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
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user