nixos/hosts/common/optional/printing.nix

37 lines
754 B
Nix
Raw Normal View History

2024-09-09 11:41:10 +01:00
{pkgs, ...}: {
services = {
2024-09-09 11:41:10 +01:00
udev.packages = [pkgs.sane-airscan];
printing = {
enable = true;
2024-09-09 11:41:10 +01:00
drivers = [pkgs.gutenprint pkgs.hplip];
};
avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
};
2024-09-09 11:41:10 +01:00
hardware = {
sane = {
enable = true;
extraBackends = [pkgs.sane-airscan];
netConf = "10.0.10.2";
};
printers = {
ensurePrinters = [
{
name = "HP_ENVY_6000";
description = "Network printer hosted on bob";
location = "bob";
deviceUri = "ipp://bob/printers/HP_ENVY_6000_series";
model = "everywhere";
ppdOptions = {
PageSize = "A4";
};
}
];
};
};
}