mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2025-12-12 11:36:20 +00:00
24 lines
469 B
Nix
24 lines
469 B
Nix
{ pkgs, lib, config, ... }:
|
|
with lib;
|
|
|
|
let cfg = config.services.airprint;
|
|
|
|
in {
|
|
options.services.airprint = {
|
|
enable = mkEnableOption "Enable printing over the air using sane and avahi";
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
hardware.sane = {
|
|
enable = true;
|
|
extraBackends = [ pkgs.sane-airscan ];
|
|
};
|
|
services.printing.enable = true;
|
|
services.avahi = {
|
|
enable = true;
|
|
nssmdns4 = true;
|
|
openFirewall = true;
|
|
};
|
|
};
|
|
}
|