peripherals/printing: add printing module
This commit is contained in:
parent
ffae6bae75
commit
c9867532be
2 changed files with 19 additions and 15 deletions
19
modules/modules/hardware/peripherals/printing.nix
Normal file
19
modules/modules/hardware/peripherals/printing.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
with lib;
|
||||
with lib.hlissner;
|
||||
let
|
||||
cfg = config.modules.hardware.peripherals.printing;
|
||||
in
|
||||
{
|
||||
options.modules.hardware.peripherals.printing = with types; {
|
||||
enable = mkBoolOpt false;
|
||||
drivers = mkOpt (functionTo listOf package) (pkgs: [ ]);
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = cfg.drivers pkgs;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue