48 lines
1004 B
Nix
Raw Normal View History

2024-12-20 22:37:44 -05:00
{
config,
lib,
pkgs,
...
}:
2024-12-17 15:26:10 -05:00
let
zfs_clone_send =
(pkgs.writeScriptBin "zfs_clone_send" (builtins.readFile ./files/zfs_clone_send.bash)).overrideAttrs
(old: {
buildCommand = "${old.buildCommand}\n patchShebangs $out";
});
zfs_clone_recv =
(pkgs.writeScriptBin "zfs_clone_recv" (builtins.readFile ./files/zfs_clone_recv.bash)).overrideAttrs
(old: {
buildCommand = "${old.buildCommand}\n patchShebangs $out";
});
zfs_clone_resume =
(pkgs.writeScriptBin "zfs_clone_resume" (builtins.readFile ./files/zfs_clone_resume.bash))
.overrideAttrs
(old: {
buildCommand = "${old.buildCommand}\n patchShebangs $out";
});
in
2024-12-17 15:26:10 -05:00
{
2024-12-20 22:37:44 -05:00
imports = [ ];
2024-12-17 15:26:10 -05:00
boot.zfs.devNodes = "/dev/disk/by-partuuid";
services.zfs = {
autoScrub = {
enable = true;
interval = "monthly";
};
trim.enable = true;
};
environment.systemPackages = with pkgs; [
zfs_clone_send
zfs_clone_recv
zfs_clone_resume
];
2024-12-17 15:26:10 -05:00
}