You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
550 B
Nix
26 lines
550 B
Nix
{ config, lib, ... }:
|
|
let
|
|
cfg = config.services.printing;
|
|
in
|
|
{
|
|
|
|
options.services.printing = {
|
|
enableAutoDiscovery = lib.mkEnableOption ''
|
|
CUPS automatic discovery of printers.
|
|
|
|
This will enable & configure Avahi accordingly,
|
|
including opening ports in the firewall'';
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
# TODO make also possible with systemd-resolved
|
|
services.avahi = lib.mkIf cfg.enableAutoDiscovery {
|
|
enable = true;
|
|
nssmdns4 = true;
|
|
nssmdns6 = true;
|
|
openFirewall = true;
|
|
};
|
|
};
|
|
|
|
}
|