2024-02-08 06:15:45 +01:00
|
|
|
{ config, lib, pkgs, username, ... }:
|
2024-02-08 04:03:29 +01:00
|
|
|
|
|
|
|
let inherit (import ../../options.nix) printer; in
|
|
|
|
lib.mkIf (printer == true) {
|
|
|
|
services = {
|
|
|
|
printing.enable = true;
|
|
|
|
avahi = {
|
|
|
|
enable = true;
|
|
|
|
nssmdns4 = true;
|
|
|
|
openFirewall = true;
|
|
|
|
};
|
2024-02-08 06:15:45 +01:00
|
|
|
ipp-usb.enable = true;
|
|
|
|
};
|
|
|
|
hardware.sane = {
|
|
|
|
enable = true;
|
|
|
|
extraBackends = [pkgs.sane-airscan];
|
|
|
|
disabledDefaultBackends = ["escl"];
|
2024-02-08 04:03:29 +01:00
|
|
|
};
|
2024-02-11 00:40:55 +01:00
|
|
|
programs.system-config-printer.enable = true;
|
2024-02-08 04:43:53 +01:00
|
|
|
users.users.${username}.extraGroups = ["scanner" "lp"];
|
2024-02-08 04:03:29 +01:00
|
|
|
}
|