zaneyos/config/system/printer.nix

22 lines
519 B
Nix
Raw Normal View History

{ 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;
};
ipp-usb.enable = true;
};
hardware.sane = {
enable = true;
extraBackends = [pkgs.sane-airscan];
disabledDefaultBackends = ["escl"];
2024-02-08 04:03:29 +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
}