nixos-config/homes/common/zfs.nix
Ingolf Wagner 7a6510a4e6
nix fmt
2024-08-29 08:26:04 +07:00

33 lines
651 B
Nix

{
config,
pkgs,
lib,
...
}:
with pkgs;
with lib;
{
config = mkMerge [
{
home.packages = [
(
let
options = [
"name"
"mountpoint"
"compression"
"com.sun:auto-snapshot:yearly"
"com.sun:auto-snapshot:monthly"
"com.sun:auto-snapshot:daily"
"com.sun:auto-snapshot:hourly"
];
in
pkgs.writers.writeBashBin "zfs-overview" ''
${pkgs.zfs}/bin/zfs list -o ${concatStringsSep "," options} "$@"
''
)
pkgs.zfs-prune-snapshots
];
}
];
}