os/modules/printing/default.nix

34 lines
757 B
Nix
Raw Normal View History

2022-11-20 22:28:23 +00:00
{
lib,
config,
pkgs,
...
}:
with lib; let
2021-05-30 19:10:28 +00:00
psCfg = config.pub-solar;
cfg = config.pub-solar.printing;
2022-11-20 22:28:23 +00:00
in {
2021-05-30 19:10:28 +00:00
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;
2022-11-20 22:28:23 +00:00
services.printing.listenAddresses = ["localhost:631"];
services.printing.allowFrom = ["all"];
2021-05-30 19:10:28 +00:00
services.printing.defaultShared = false;
services.printing.drivers = [
pkgs.gutenprint
];
hardware.sane = {
enable = true;
brscan4.enable = true;
};
};
}