nixos-images/nix/noninteractive.nix
dantefromhell eafead23ae
Add zfs packages
ZFS related binaries like `zpool`, `zfs` and `zdb` were missing from the kexec image.

This PR fixes the following issues I encountered during testing in the OVH "Public Cloud":

- Machines pre-installed with Debian 11 print error `zdb: command not found` during `disk-deactivate` when trying to remove `/dev/sda14`

- Trying to create a simple zpool + zfs dataset that is mounted as `/` fails with `zpool: command not found`
On OVH machines the installer would print an error being unable to locate the `zdb` binary,
2023-05-22 00:01:53 +00:00

35 lines
1.1 KiB
Nix

# This module optimizes for non-interactive deployments by remove some store paths
# which are primarily useful for interactive installations.
{ config, lib, pkgs, ... }: {
disabledModules = [
# This module adds values to multiple lists (systemPackages, supportedFilesystems)
# which are impossible/unpractical to remove, so we disable the entire module.
"profiles/base.nix"
];
# among others, this prevents carrying a stdenv with gcc in the image
system.extraDependencies = lib.mkForce [];
# prevents shipping nixpkgs, unnecessary if system is evaluated externally
nix.registry = lib.mkForce {};
# would pull in nano
programs.nano.syntaxHighlight = lib.mkForce false;
# prevents nano, strace
environment.defaultPackages = lib.mkForce [
pkgs.rsync
pkgs.parted
pkgs.zfs
];
# zfs support is accidentally disabled by excluding base.nix, re-enable it
boot = {
kernelModules = [ "zfs" ];
extraModulePackages = [ config.boot.kernelPackages.zfs ];
};
# we can drop this after 23.05 has been released, which has this set by default
hardware.enableRedistributableFirmware = lib.mkForce false;
}