43 lines
839 B
Nix
43 lines
839 B
Nix
{
|
|
pkgs,
|
|
configVars,
|
|
...
|
|
}: let
|
|
serverIp = configVars.networking.addresses.merlin.ip;
|
|
in {
|
|
services = {
|
|
udev.packages = [pkgs.sane-airscan];
|
|
printing = {
|
|
enable = true;
|
|
drivers = [pkgs.gutenprint pkgs.hplip];
|
|
};
|
|
avahi = {
|
|
enable = true;
|
|
nssmdns4 = true;
|
|
openFirewall = true;
|
|
};
|
|
};
|
|
|
|
hardware = {
|
|
sane = {
|
|
enable = true;
|
|
extraBackends = [pkgs.sane-airscan];
|
|
netConf = "${serverIp}";
|
|
};
|
|
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";
|
|
};
|
|
}
|
|
];
|
|
};
|
|
};
|
|
}
|