2022-03-30 09:31:56 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.programs.nbd;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
programs.nbd = {
|
2022-09-09 14:08:57 +00:00
|
|
|
enable = mkEnableOption (lib.mdDoc "Network Block Device (nbd) support");
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
environment.systemPackages = with pkgs; [ nbd ];
|
|
|
|
boot.kernelModules = [ "nbd" ];
|
|
|
|
};
|
|
|
|
}
|