add printing module

This commit is contained in:
Sakooooo 2024-07-05 21:03:57 +04:00
parent a0f4793ee1
commit c9463663b4
Signed by: sako
GPG key ID: FE52FD65B76E4751
2 changed files with 28 additions and 0 deletions

View file

@ -24,5 +24,6 @@
./plymouth ./plymouth
# vpn # vpn
./wireguard ./wireguard
./printing
]; ];
} }

View file

@ -0,0 +1,27 @@
{
options,
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.modules.desktop.printing;
in {
options.modules.desktop.printing = {
enable = mkEnableOption false;
};
config = mkIf cfg.enable {
# enable printing itself
services.printing.enable = true;
# autodiscovery of printers
services.avahi = {
enable = true;
nssmdns = true;
openFirewall = true;
};
};
}