os/modules/printing/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
803 B
Nix
Raw Permalink Normal View History

2021-05-30 19:10:28 +00:00
{
lib,
config,
pkgs,
...
}:
with lib; let
psCfg = config.pub-solar;
cfg = config.pub-solar.printing;
in {
options.pub-solar.printing = {
enable = mkEnableOption "CUPSSSss";
};
config = mkIf cfg.enable {
services.avahi.enable = true;
services.avahi.nssmdns = true;
services.avahi.publish.enable = true;
services.avahi.publish.userServices = true;
services.printing.enable = true;
services.printing.browsing = true;
services.printing.listenAddresses = ["localhost:631"];
services.printing.allowFrom = ["all"];
services.printing.defaultShared = false;
services.printing.drivers = [
pkgs.gutenprint
];
hardware.sane = {
enable = true;
brscan4.enable = true;
2023-01-28 21:27:52 +00:00
extraBackends = [pkgs.hplipWithPlugin];
2021-05-30 19:10:28 +00:00
};
};
}