Merge branch 'master' of git.bitlab21.com:sam/nixos
This commit is contained in:
commit
cb3d0c53d0
|
@ -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,7 +36,13 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.printers = {
|
hardware = {
|
||||||
|
sane = {
|
||||||
|
enable = true;
|
||||||
|
extraBackends = [pkgs.sane-airscan pkgs.hplipWithPlugin];
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
printers = {
|
||||||
ensurePrinters = [
|
ensurePrinters = [
|
||||||
{
|
{
|
||||||
name = "HP_Envy_6000";
|
name = "HP_Envy_6000";
|
||||||
|
@ -43,4 +57,5 @@
|
||||||
];
|
];
|
||||||
ensureDefaultPrinter = "HP_Envy_6000";
|
ensureDefaultPrinter = "HP_Envy_6000";
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -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];
|
||||||
|
|
Loading…
Reference in New Issue