97 lines
2.0 KiB
Nix
97 lines
2.0 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
with lib;
|
|
let
|
|
cfg = config.fuckingprint;
|
|
|
|
fixPlatforms = p: p.overrideAttrs (super: super // { meta = super.meta // { platforms = super.meta.platforms ++ [ "x86_64-linux" ]; }; });
|
|
in
|
|
{
|
|
options.fuckingprint.enable = mkEnableOption "Make my fucking printer work";
|
|
|
|
config = mkIf cfg.enable {
|
|
# Enable CUPS and SANE for printing and scanning
|
|
services.printing.enable = true;
|
|
services.printing.browsing = true;
|
|
services.printing.listenAddresses = [ "*:631" ];
|
|
services.printing.allowFrom = [ "all" ];
|
|
services.printing.defaultShared = true;
|
|
services.printing.drivers = with pkgs; [
|
|
gutenprint
|
|
gutenprintBin
|
|
|
|
hplip
|
|
|
|
samsungUnifiedLinuxDriver
|
|
splix
|
|
brlaser
|
|
|
|
brgenml1lpr
|
|
brgenml1cupswrapper
|
|
|
|
carps-cups
|
|
|
|
epson-201106w
|
|
epson-alc1100
|
|
epson-escpr
|
|
epson-escpr2
|
|
epson-workforce-635-nx625-series
|
|
epson_201207w
|
|
|
|
fxlinuxprint
|
|
|
|
canon-cups-ufr2
|
|
|
|
cups-bjnp
|
|
|
|
cups-brother-hl1110
|
|
cups-brother-hl1210w
|
|
cups-brother-hl3140cw
|
|
cups-brother-hll2340dw
|
|
|
|
cups-drv-rastertosag-gdi
|
|
|
|
cups-dymo
|
|
|
|
cups-kyocera
|
|
cups-kyocera-ecosys-m552x-p502x
|
|
# cups-kyodialog3 # Mirror is down
|
|
|
|
cups-toshiba-estudio
|
|
|
|
cups-zj-58
|
|
|
|
mfc9140cdncupswrapper
|
|
mfc9140cdnlpr
|
|
|
|
mfcj470dw-cupswrapper
|
|
mfcj470dwlpr
|
|
|
|
mfcj6510dw-cupswrapper
|
|
mfcj6510dwlpr
|
|
|
|
mfcl2700dncupswrapper
|
|
mfcl2700dnlpr
|
|
mfcl2720dwcupswrapper
|
|
mfcl2720dwlpr
|
|
mfcl2740dwcupswrapper
|
|
mfcl2740dwlpr
|
|
|
|
mfcl3770cdwcupswrapper
|
|
mfcl3770cdwlpr
|
|
|
|
# Maybe this isn't a good idea?
|
|
(mfcl8690cdwcupswrapper.override { mfcl8690cdwlpr = fixPlatforms mfcl8690cdwlpr; })
|
|
(fixPlatforms mfcl8690cdwlpr)
|
|
];
|
|
hardware.sane.enable = true;
|
|
hardware.sane.brscan4.enable = true;
|
|
hardware.sane.extraBackends = with pkgs; [
|
|
utsushi
|
|
epkowa
|
|
hplipWithPlugin
|
|
brscan4
|
|
dsseries
|
|
];
|
|
};
|
|
}
|