nixos/modules/desktop/printing/default.nix

24 lines
526 B
Nix
Raw Normal View History

{ options, config, lib, pkgs, ... }:
let cfg = config.modules.desktop.printing;
2024-07-05 21:03:57 +04:00
in {
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;
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;
};
users.users.sako.packages = with pkgs; [ simple-scan ];
2024-07-05 21:03:57 +04:00
};
}