2023-08-13 17:00:41 +01:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: {
|
2024-04-27 11:33:38 +01:00
|
|
|
networking.firewall = {
|
2021-05-31 09:15:44 +01:00
|
|
|
enable = true;
|
2024-04-27 11:33:38 +01:00
|
|
|
allowedTCPPorts = [631 6566];
|
|
|
|
allowedUDPPorts = [631 6566];
|
|
|
|
};
|
|
|
|
services = {
|
|
|
|
printing = {
|
|
|
|
enable = true;
|
|
|
|
drivers = with pkgs; [epson-escpr];
|
|
|
|
listenAddresses = ["*:631"];
|
|
|
|
defaultShared = true;
|
|
|
|
browsing = true;
|
|
|
|
allowFrom = ["all"];
|
|
|
|
extraConf = ''
|
|
|
|
ServerAlias *
|
|
|
|
DefaultEncryption Never
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
udev.packages = [];
|
|
|
|
|
|
|
|
saned = {
|
|
|
|
enable = true;
|
|
|
|
extraConfig = ''
|
|
|
|
100.69.222.80
|
|
|
|
10.0.24.0/24
|
|
|
|
10.0.0.1/24
|
|
|
|
foureighty
|
|
|
|
hagath
|
|
|
|
'';
|
|
|
|
};
|
2021-05-31 09:15:44 +01:00
|
|
|
};
|
|
|
|
|
2023-08-13 17:00:41 +01:00
|
|
|
hardware.printers.ensurePrinters = [
|
|
|
|
{
|
|
|
|
description = "Epson XP-540";
|
|
|
|
location = "connected to bolty";
|
|
|
|
name = "epson_xp540";
|
|
|
|
deviceUri = "usb://EPSON/XP-540%20Series?serial=583245393030303936&interface=1";
|
|
|
|
model = "raw";
|
|
|
|
ppdOptions = {PageSize = "A4";};
|
|
|
|
}
|
|
|
|
];
|
2021-05-31 09:15:44 +01:00
|
|
|
|
|
|
|
hardware.sane = {
|
|
|
|
enable = true;
|
2023-08-13 17:00:41 +01:00
|
|
|
extraBackends = with pkgs; [sane-airscan gawk];
|
2021-05-31 09:15:44 +01:00
|
|
|
snapshot = true;
|
|
|
|
};
|
|
|
|
|
2023-08-13 17:00:41 +01:00
|
|
|
environment.systemPackages = with pkgs; [gawk];
|
2021-05-31 09:15:44 +01:00
|
|
|
}
|