I’m still fairly new to NixOS and nixops. Currently I’m running NixOS on my laptop and enjoying it. Now I’m trying to use nixops to test some zfs changes in a VM. I’ve got an overlay that seems to work to build the zfs kernel module and user package on its own when I run nix build
. But when I put it in nixops, I’m getting an error. It may be related to Nixops issue #893, but I’m unable to figure it out, and my hunch is I’m missing something pretty simple. Here’s my nixops output:
nixops deploy -d zfs
building all machine configurations...
error: attribute 'extend' missing, at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/system/boot/kernel.nix:39:31
(use '--show-trace' to show detailed location information)
error: unable to build all machine configurations
Here’s the “logical” part of my nixops config:
{
network.description = "zfs test";
zfstest =
{ config, pkgs, ... }:
{
boot.zfs.enableUnstable = true;
boot.supportedFilesystems = [ "zfs" ];
boot.kernelPackages = pkgs.linuxPackages_4_15;
nixpkgs.overlays = [(
self: super:
{
zfsUnstable = super.zfsUnstable.overrideAttrs (oldAttrs : {
src = super.fetchFromGitHub {
owner = "rbrewer123";
repo = "zfs";
#rev = "b4555c777a0be3c0dba29662d278c57099c60a87";
#sha256 = "03k1maiz70jbk45619yqcf3larhvgilaxnvkid3972knm7ycgjsh";
rev = "de4a0c31b5d269e39114181465ddbba448a4db3f";
sha256 = "0ghpn9lsjdpx2qh4wk48vdd22sa1qv4hw49m0p4lv6ap5h14bx0v";
};
});
linuxPackages_4_15.zfsUnstable = super.linuxPackages_4_15.zfsUnstable.overrideAttrs (oldAttrs : {
src = super.fetchFromGitHub {
owner = "rbrewer123";
repo = "zfs";
#rev = "b4555c777a0be3c0dba29662d278c57099c60a87";
#sha256 = "03k1maiz70jbk45619yqcf3larhvgilaxnvkid3972knm7ycgjsh";
rev = "de4a0c31b5d269e39114181465ddbba448a4db3f";
sha256 = "0ghpn9lsjdpx2qh4wk48vdd22sa1qv4hw49m0p4lv6ap5h14bx0v";
};
});
}
)];
};
}
Does anyone have any ideas what’s wrong?