nixos/modules/desktop/printing/default.nix

33 lines
497 B
Nix
Raw Normal View History

2024-07-05 21:03:57 +04:00
{
options,
config,
lib,
pkgs,
...
}:
2024-08-01 16:24:09 +04:00
let
2024-07-05 21:03:57 +04:00
cfg = config.modules.desktop.printing;
in {
options.modules.desktop.printing = {
2024-08-01 16:24:09 +04:00
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;
drivers = with pkgs; [
epson-escpr
];
};
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;
};
};
}