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

View file

@ -1,15 +0,0 @@
{ pkgs, ... }: {
services.printing = {
enable = true;
drivers = with pkgs; [
cnijfilter2
gutenprintBin
cupsBjnp
cups-bjnp
canon-cups-ufr2
carps-cups
cnijfilter_2_80
cnijfilter_4_00
];
};
}