106 lines
2.0 KiB
Nix
106 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;
|
|
drivers = with pkgs; [
|
|
gutenprint
|
|
gutenprintBin
|
|
|
|
hplip
|
|
|
|
samsung-unified-linux-driver
|
|
splix
|
|
brlaser
|
|
|
|
brgenml1lpr
|
|
brgenml1cupswrapper
|
|
|
|
carps-cups
|
|
|
|
epson-alc1100
|
|
epson-escpr
|
|
epson-escpr2
|
|
|
|
fxlinuxprint
|
|
|
|
canon-cups-ufr2
|
|
|
|
cups-brother-hl1110
|
|
cups-brother-hl1210w
|
|
cups-brother-hl3140cw
|
|
cups-brother-hll2340dw
|
|
|
|
cups-drv-rastertosag-gdi
|
|
|
|
cups-dymo
|
|
|
|
# cups-kyocera # mirror is down
|
|
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;
|
|
brscan4.enable = true;
|
|
brscan5.enable = true;
|
|
dsseries.enable = true;
|
|
drivers.scanSnap.enable = true;
|
|
extraBackends = with pkgs; [
|
|
epkowa
|
|
hplipWithPlugin
|
|
];
|
|
};
|
|
};
|
|
}
|