mirror of
https://github.com/kaesaecracker/nixos-configuration.git
synced 2025-01-18 18:40:14 +01:00
24 lines
498 B
Nix
24 lines
498 B
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}: let
|
|
isEnabled = config.my.desktop.enablePrinting;
|
|
in {
|
|
options.my.desktop.enablePrinting = lib.mkEnableOption "printing";
|
|
|
|
config = lib.mkIf isEnabled {
|
|
services = {
|
|
# Enable CUPS to print documents.
|
|
printing.enable = true;
|
|
|
|
avahi = {
|
|
enable = true; # runs the Avahi daemon
|
|
nssmdns = true; # enables the mDNS NSS plug-in
|
|
openFirewall = true; # opens the firewall for UDP port 5353
|
|
};
|
|
};
|
|
};
|
|
}
|