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
This commit is contained in:
19
nixos/modules/programs/nbd.nix
Normal file
19
nixos/modules/programs/nbd.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{ 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" ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user