setup remote scanning

This commit is contained in:
Sam 2025-01-24 13:50:26 +00:00
parent 4b3aa6463e
commit fad69be936
2 changed files with 31 additions and 15 deletions

View File

@ -1,10 +1,18 @@
{pkgs, ...}: {
{pkgs, configVars, ...}: let
gatewayIp = configVars.networking.addresses.gateway.ip;
in {
networking.firewall = {
allowedTCPPorts = [631];
allowedUDPPorts = [631];
};
services = {
udev.packages = [pkgs.sane-airscan];
ipp-usb.enable = true;
saned = {
enable = true;
extraConfig = "${gatewayIp}/24";
};
printing = {
enable = true;
drivers = [pkgs.hplip];
@ -28,7 +36,13 @@
};
};
hardware.printers = {
hardware = {
sane = {
enable = true;
extraBackends = [pkgs.sane-airscan pkgs.hplipWithPlugin];
openFirewall = true;
};
printers = {
ensurePrinters = [
{
name = "HP_Envy_6000";
@ -43,4 +57,5 @@
];
ensureDefaultPrinter = "HP_Envy_6000";
};
};
}

View File

@ -7,6 +7,7 @@
in {
services = {
udev.packages = [pkgs.sane-airscan];
hardware.sane.netConf = serverIp;
printing = {
enable = true;
drivers = [pkgs.gutenprint pkgs.hplip];