add zfs commands

main
Ingolf Wagner 2024-04-25 11:39:11 +02:00
parent 65eac0b41c
commit e163d452d9
Signed by: palo
GPG Key ID: 76BF5F1928B9618B
2 changed files with 27 additions and 0 deletions

View File

@ -3,6 +3,7 @@
imports = [
./packages.nix
./terminal.nix
./zfs.nix
];
options.gui.enable = lib.mkEnableOption "should GUI packages be anabled?";
}

View File

@ -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} "$@"
''
)
];
}
];
}