2024-11-01 14:07:50 +04:00
|
|
|
{ options, config, lib, pkgs, ... }:
|
|
|
|
let cfg = config.modules.desktop.printing;
|
2024-07-05 21:03:57 +04:00
|
|
|
in {
|
2024-11-01 14:07:50 +04:00
|
|
|
options.modules.desktop.printing = { enable = lib.mkEnableOption false; };
|
2024-07-05 21:03:57 +04:00
|
|
|
|
2024-08-01 16:24:09 +04:00
|
|
|
config = lib.mkIf cfg.enable {
|
2024-07-05 21:03:57 +04:00
|
|
|
# enable printing itself
|
2024-07-05 21:15:02 +04:00
|
|
|
services.printing = {
|
|
|
|
enable = true;
|
2024-11-01 14:07:50 +04:00
|
|
|
drivers = with pkgs; [ epson-escpr ];
|
2024-07-05 21:15:02 +04:00
|
|
|
};
|
2024-07-05 21:03:57 +04:00
|
|
|
|
|
|
|
# autodiscovery of printers
|
|
|
|
services.avahi = {
|
|
|
|
enable = true;
|
2024-07-05 21:05:03 +04:00
|
|
|
nssmdns4 = true;
|
2024-07-05 21:03:57 +04:00
|
|
|
openFirewall = true;
|
|
|
|
};
|
|
|
|
|
2024-11-01 14:07:50 +04:00
|
|
|
users.users.sako.packages = with pkgs; [ simple-scan ];
|
|
|
|
|
2024-07-05 21:03:57 +04:00
|
|
|
};
|
|
|
|
}
|