nixos-images/nix/zfs-minimal.nix

22 lines
671 B
Nix
Raw Permalink Normal View History

{ config, lib, pkgs, ... }:
# incorperate a space-optimized version of zfs
let
2024-08-16 10:34:39 +02:00
zfs = pkgs.zfsUnstable.override {
# this overrides saves 10MB
samba = pkgs.coreutils;
python3 = pkgs.python3Minimal;
};
in
{
services.udev.packages = [ zfs ]; # to hook zvol naming, etc.
# unsure if need this, but in future udev rules could potentially point to systemd services.
systemd.packages = [ zfs ];
environment.defaultPackages = lib.mkForce [ zfs ]; # this merges with outer noninteractive module.
boot.kernelModules = [ "zfs" ];
2024-08-16 10:34:39 +02:00
boot.extraModulePackages = [ config.boot.kernelPackages.zfs_unstable ];
networking.hostId = lib.mkDefault "8425e349";
}