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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -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
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue