peripherals/printing: add printing module

This commit is contained in:
Infinidoge 2021-12-02 09:24:30 -05:00
parent ffae6bae75
commit c9867532be
2 changed files with 19 additions and 15 deletions

View 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;
};
};
}