add zfs commands
This commit is contained in:
parent
65eac0b41c
commit
e163d452d9
2 changed files with 27 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
./packages.nix
|
./packages.nix
|
||||||
./terminal.nix
|
./terminal.nix
|
||||||
|
./zfs.nix
|
||||||
];
|
];
|
||||||
options.gui.enable = lib.mkEnableOption "should GUI packages be anabled?";
|
options.gui.enable = lib.mkEnableOption "should GUI packages be anabled?";
|
||||||
}
|
}
|
||||||
|
|
26
nixos/homes/common/zfs.nix
Normal file
26
nixos/homes/common/zfs.nix
Normal 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} "$@"
|
||||||
|
''
|
||||||
|
)
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
Loading…
Reference in a new issue