diff options
author | pennae <82953136+pennae@users.noreply.github.com> | 2022-03-11 01:02:10 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-11 01:02:10 +0000 |
commit | af0f3944bdb5ffd1d9a348b539edbe09a38a51ac (patch) | |
tree | 03dfaa2082df23406380f84d72f7726dc7932166 /nixos/modules/programs | |
parent | e9545762b032559c27d8ec9141ed63ceca1aa1ac (diff) | |
parent | 252f20aaa2744d9fe6e3b4ade2d2f44c0448ca06 (diff) |
Merge pull request #163009 from scvalex/nbd-service
nbd: add nbd service and test
Diffstat (limited to 'nixos/modules/programs')
-rw-r--r-- | nixos/modules/programs/nbd.nix | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/nixos/modules/programs/nbd.nix b/nixos/modules/programs/nbd.nix new file mode 100644 index 0000000000000..fea9bc1ff71a1 --- /dev/null +++ b/nixos/modules/programs/nbd.nix @@ -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" ]; + }; +} |