nix-git/modules/print-and-scan.nix
2023-10-09 13:06:17 +02:00

31 lines
832 B
Nix

{ config, pkgs, ... }:
{
# Printing with IPP everywhere capable printers
# https://nixos.wiki/wiki/Printing
# Enable CUPS to print documents.
services.printing.enable = true;
# HP and Lexmark drivers
services.printing.drivers = [ pkgs.hplip pkgs.postscript-lexmark ];
services.avahi.enable = true;
services.avahi.nssmdns = true;
# WiFi printers
services.avahi.openFirewall = true;
# Scanning
# https://nixos.wiki/wiki/Scanners
# https://unix.stackexchange.com/questions/518687/how-do-i-set-up-scanning-from-an-hp-officejet-pro-on-nixos/518688
hardware.sane = {
enable = true;
# Optionally, add pkgs.sane-airscan for AirScan.
extraBackends = [ pkgs.hplip ];
};
users.users.yoda = {
extraGroups = [ "scanner" "lp" ];
packages = with pkgs; [
gnome.simple-scan
];
};
}