2023-12-29 16:43:40 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
2023-05-19 20:53:02 +02:00
|
|
|
|
2023-12-30 23:39:33 +01:00
|
|
|
let cfg = config.jopejoe1.printing;
|
|
|
|
in {
|
2023-12-29 16:43:40 +01:00
|
|
|
options.jopejoe1.printing = {
|
|
|
|
enable = lib.mkEnableOption "Enable Printing";
|
2023-05-19 20:53:02 +02:00
|
|
|
};
|
|
|
|
|
2023-12-29 16:43:40 +01:00
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
services.printing = {
|
2023-05-19 20:53:02 +02:00
|
|
|
enable = true;
|
2023-12-29 16:43:40 +01:00
|
|
|
webInterface = true;
|
|
|
|
drivers = with pkgs; [ hplipWithPlugin ];
|
|
|
|
};
|
|
|
|
|
|
|
|
hardware = {
|
|
|
|
sane = {
|
|
|
|
enable = true;
|
|
|
|
extraBackends = with pkgs; [ sane-airscan hplipWithPlugin ];
|
|
|
|
};
|
2023-05-19 20:53:02 +02:00
|
|
|
};
|
|
|
|
|
2023-12-29 16:43:40 +01:00
|
|
|
services.avahi = {
|
|
|
|
enable = true;
|
|
|
|
nssmdns4 = true;
|
|
|
|
openFirewall = true;
|
|
|
|
};
|
2023-05-19 20:53:02 +02:00
|
|
|
};
|
|
|
|
}
|
2023-12-29 16:43:40 +01:00
|
|
|
|