Skip to content

Commit

Permalink
Merge pull request NixOS#70240 from woffs/pr-etc-zpool.d
Browse files Browse the repository at this point in the history
nixos module zfs: provide /etc/zfs/zpool.d
  • Loading branch information
Mic92 committed Oct 15, 2019
2 parents e071809 + 17f76a9 commit faa7ce3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions nixos/modules/tasks/filesystems/zfs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ in
};

environment.etc."zfs/zed.d".source = "${packages.zfsUser}/etc/zfs/zed.d/";
environment.etc."zfs/zpool.d".source = "${packages.zfsUser}/etc/zfs/zpool.d/";

system.fsPackages = [ packages.zfsUser ]; # XXX: needed? zfs doesn't have (need) a fsck
environment.systemPackages = [ packages.zfsUser ]
Expand Down
8 changes: 8 additions & 0 deletions pkgs/os-specific/linux/zfs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
, libtirpc
, nfs-utils
, gawk, gnugrep, gnused, systemd
, smartmontools, sysstat, sudo

# Kernel dependencies
, kernel ? null
Expand Down Expand Up @@ -131,6 +132,13 @@ let
(cd $out/share/bash-completion/completions; ln -s zfs zpool)
'';

postFixup = ''
path="PATH=${makeBinPath [ coreutils gawk gnused gnugrep utillinux smartmontools sysstat sudo ]}"
for i in $out/libexec/zfs/zpool.d/*; do
sed -i "2i$path" $i
done
'';

outputs = [ "out" ] ++ optionals buildUser [ "lib" "dev" ];

meta = {
Expand Down

0 comments on commit faa7ce3

Please sign in to comment.