Add scanning support to the printer option cuz Jerry is awesome

This commit is contained in:
Tyler Kelley 2024-02-08 07:35:35 +00:00
commit d3b687b521

View File

@ -1,4 +1,4 @@
{ config, lib, ... }: { config, lib, pkgs, username, ... }:
let inherit (import ../../options.nix) printer; in let inherit (import ../../options.nix) printer; in
lib.mkIf (printer == true) { lib.mkIf (printer == true) {
@ -9,5 +9,12 @@ lib.mkIf (printer == true) {
nssmdns4 = true; nssmdns4 = true;
openFirewall = true; openFirewall = true;
}; };
ipp-usb.enable = true;
}; };
hardware.sane = {
enable = true;
extraBackends = [pkgs.sane-airscan];
disabledDefaultBackends = ["escl"];
};
users.users.${username}.extraGroups = ["scanner" "lp"];
} }