diff --git a/nixos/homes/common/default.nix b/nixos/homes/common/default.nix index 6430844..bda4196 100644 --- a/nixos/homes/common/default.nix +++ b/nixos/homes/common/default.nix @@ -3,6 +3,7 @@ imports = [ ./packages.nix ./terminal.nix + ./zfs.nix ]; options.gui.enable = lib.mkEnableOption "should GUI packages be anabled?"; } diff --git a/nixos/homes/common/zfs.nix b/nixos/homes/common/zfs.nix new file mode 100644 index 0000000..66e5270 --- /dev/null +++ b/nixos/homes/common/zfs.nix @@ -0,0 +1,26 @@ +{ config, pkgs, lib, ... }: +with pkgs; +with lib; +{ + config = mkMerge [ + { + home.packages = [ + ( + let + options = [ + "name" + "mountpoint" + "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} "$@" + '' + ) + ]; + } + ]; +}