nixpkgs/nixos/modules/programs/nbd.nix
Alexandru Scvortov 252f20aaa2 nbd: add programs.nbd, services.nbd, and test
Changes:

nbd: Update nixos/modules/services/networking/nbd.nix

Co-authored-by: pennae <82953136+pennae@users.noreply.github.com>

nbd: Update nixos/modules/services/networking/nbd.nix

Co-authored-by: pennae <82953136+pennae@users.noreply.github.com>

nbd: Update nixos/tests/nbd.nix

Co-authored-by: pennae <82953136+pennae@users.noreply.github.com>

nbd: generalize options in nbd service

nbd: harden service

nbd: Update nixos/modules/services/networking/nbd.nix

Co-authored-by: pennae <82953136+pennae@users.noreply.github.com>

nbd: Update nixos/modules/services/networking/nbd.nix

Co-authored-by: pennae <82953136+pennae@users.noreply.github.com>

nbd: refactor code a bit and BindPaths automatically
2022-03-09 12:00:47 +00:00

20 lines
319 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.programs.nbd;
in
{
options = {
programs.nbd = {
enable = mkEnableOption "Network Block Device (nbd) support";
};
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ nbd ];
boot.kernelModules = [ "nbd" ];
};
}