Merge branch 'master' of git.bitlab21.com:sam/nixos

This commit is contained in:
Sam 2025-01-24 13:51:11 +00:00
commit cb3d0c53d0
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 = { networking.firewall = {
allowedTCPPorts = [631]; allowedTCPPorts = [631];
allowedUDPPorts = [631]; allowedUDPPorts = [631];
}; };
services = { services = {
udev.packages = [pkgs.sane-airscan];
ipp-usb.enable = true;
saned = {
enable = true;
extraConfig = "${gatewayIp}/24";
};
printing = { printing = {
enable = true; enable = true;
drivers = [pkgs.hplip]; drivers = [pkgs.hplip];
@ -28,19 +36,26 @@
}; };
}; };
hardware.printers = { hardware = {
ensurePrinters = [ sane = {
{ enable = true;
name = "HP_Envy_6000"; extraBackends = [pkgs.sane-airscan pkgs.hplipWithPlugin];
location = "Home"; openFirewall = true;
deviceUri = "usb://HP/ENVY%206000%20series?serial=TH0B93F08W&interface=1"; };
# deviceUri = "usb://Dell/1250c%20Color%20Printer?serial=YNP023240"; printers = {
model = "HP/hp-deskjet_plus_6000_series.ppd.gz"; ensurePrinters = [
ppdOptions = { {
PageSize = "A4"; name = "HP_Envy_6000";
}; location = "Home";
} deviceUri = "usb://HP/ENVY%206000%20series?serial=TH0B93F08W&interface=1";
]; # deviceUri = "usb://Dell/1250c%20Color%20Printer?serial=YNP023240";
ensureDefaultPrinter = "HP_Envy_6000"; model = "HP/hp-deskjet_plus_6000_series.ppd.gz";
ppdOptions = {
PageSize = "A4";
};
}
];
ensureDefaultPrinter = "HP_Envy_6000";
};
}; };
} }

View File

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