nixos-config/homes/common/zfs.nix

29 lines
643 B
Nix
Raw Normal View History

2024-04-25 11:39:11 +02:00
{ config, pkgs, lib, ... }:
with pkgs;
with lib;
{
config = mkMerge [
{
home.packages = [
(
let
options = [
"name"
"mountpoint"
2024-05-10 20:53:21 +02:00
"compression"
2024-04-25 11:39:11 +02:00
"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} "$@"
''
)
2024-08-07 18:35:47 +02:00
pkgs.zfs-prune-snapshots
2024-04-25 11:39:11 +02:00
];
}
];
}